-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust 1.0.0 tarball does not have proper permissions on directories. #25479
Comments
cc @brson, @alexcrichton |
Unfortunately, when run under IMO, the makefile should not try to be smart. If building as root is dangerous, the makefile should tell the user so and abort. |
While experimenting with this, I tried fixing the permissions, and I've run into yet another problem.
This doesn't make any sense. |
Yeah, I just took @Stebalien's tip and removed these lines: https://github.com/rust-lang/rust/blob/master/mk/install.mk#L12-15 |
This may be a more general problem. AIUI permissions in tarballs are pretty broken because they encode local user id's that don't make any sense when distributed elsewhere. For this reason rust-installer explicitly sets the permissions of every single file during install (saw a similar bug there where files extracted from the rustc tarball and repackaged by rust-packaging did not maintain the right bits). |
I'm curious though when this problems started happening. Our source tarball generation has barely changed ever. Has this always been a problem? |
Nominating because one of our release artifacts seems to be completely broken. |
triage: P-medium Would love to fix, but doesn't seem super high priority right now. |
FWIW, I hacked around this a long time ago in rust-installer by setting the permissions on everything at install time. |
Looking at https://static.rust-lang.org/dist/rustc-1.17.0-src.tar.gz and https://static.rust-lang.org/dist/rustc-1.16.0-src.tar.gz, this seems to be fixed, isn't it? I looked at a couple of directories, they all had In fact, the code in rustup that works around this issue is nowadays actively harmful... see rust-lang/rustup#1140 |
Yes, I am fairly certain (checked a few days back) this was fixed in the move towards a Rusty rust-installer. Closing. |
The tarball in question: https://static.rust-lang.org/dist/rustc-1.0.0-src.tar.gz
I actually don't really understand what's going on, one +x is set, and I don't understand why +x is needed on directories, but it is.
I ran into a snag, even while operating as root. I got "permission denied" when installing:
I did some digging, and I figured out the problem.
SOLUTION: Mode a+x needs to be set for all directories, so it works properly.
This is currently not the case.
EDIT: Apparently you need a+x to search for the files inside directories properly.
https://en.wikipedia.org/wiki/Chmod#Common_Errors
More detail: the dirs are currently
drwx------
, they should be at leastdrwx--x--x
, but ideallydrwxr-xr-x
The text was updated successfully, but these errors were encountered: