Describe the bug
On Linux [[1]] and Windows [[2]] the rust installation script creates a $CARGO_HOME folder which is a symlink to a folder owned by root. This causes several permissions errors as reported in https://github.com/actions/cache/issues/133#issuecomment-592476433.
Area for Triage:
"Bug"
Virtual environments affected
Expected behavior
As part of the installation script the permissions should be fixed, see https://github.com/actions/cache/issues/133#issuecomment-599102035 as a workaround for Linux.
Actual behavior
https://github.com/actions/cache/issues/133#issuecomment-592476433
Hello, @ordian
Thank you mention about the issue. I confirm this behavior and will prepare fix for it.
We fixed this issue on Ubuntu by changing the permissions during the deployment of image. Changes were merged and will be delivered to all VMs in a week.
@dibir-magomedsaygitov thanks a bunch for the PR! I see it was closed instead of being merged, was that intended?
@ordian , Yep. We have decided to apply fix during deployment instead of image-generation (this code is located in our private repository).
Unfortunately, it is not possible to fix the issue from image-generation side because user profile is re-created during deployment
@maxim-lobanov thanks for the clarification! Do you think it's possible to apply the same fix for Windows deployments as well?
@ordian , On Ubuntu, you experienced issue with permissions and this fix will help you.
On Windows, the issue is different and i don't think that it is image issue.
actions/cache uses tar to pack and unpack files and tar doesn't work properly with symlinks on Windows.
Actually, this issue affects not only Rust but NPM https://github.com/actions/cache/issues/257 and any other cases where you need to cache folder with symlinks.
~/.cargo points to C:\Rust
You can try to cache folder C:\Rust directly instead of ~/.cargo and you will face with the same issue so it doesn't matter where Rust is installed on image.
I suggest to work with actions/cache maintainers in scope of https://github.com/actions/cache/issues/120 to fix the issue with tar on Windows.
I see, thanks!
@ordian, Could you please check rust folder permissions? It should be runner:docker now.
@al-cheb seems to be working fine! https://github.com/openethereum/openethereum/pull/11706/checks?check_run_id=670160888#step:4:9
I think the issue can be closed as the problem with tar on Windows is unrelated to permissions.
Thanks everyone!
Most helpful comment
I think the issue can be closed as the problem with
taron Windows is unrelated to permissions.Thanks everyone!