Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRust 1.0.0 tarball does not have proper permissions on directories. #25479
Comments
This comment has been minimized.
This comment has been minimized.
|
cc @brson, @alexcrichton |
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
While experimenting with this, I tried fixing the permissions, and I've run into yet another problem.
This doesn't make any sense. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I just took @Stebalien's tip and removed these lines: https://github.com/rust-lang/rust/blob/master/mk/install.mk#L12-15 |
alexcrichton
added
the
A-build
label
May 18, 2015
This comment has been minimized.
This comment has been minimized.
|
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). |
This comment has been minimized.
This comment has been minimized.
|
I'm curious though when this problems started happening. Our source tarball generation has barely changed ever. Has this always been a problem? |
This comment has been minimized.
This comment has been minimized.
|
Nominating because one of our release artifacts seems to be completely broken. |
brson
added
the
I-nominated
label
May 27, 2015
alexcrichton
added
the
T-tools
label
Jun 9, 2015
This comment has been minimized.
This comment has been minimized.
|
triage: P-medium Would love to fix, but doesn't seem super high priority right now. |
rust-highfive
added
P-medium
and removed
I-nominated
labels
Jul 20, 2015
steveklabnik
added
the
A-infrastructure
label
Jan 11, 2016
alexcrichton
added
A-tools
and removed
T-tools
labels
Jan 27, 2016
This comment has been minimized.
This comment has been minimized.
|
FWIW, I hacked around this a long time ago in rust-installer by setting the permissions on everything at install time. |
alexcrichton
added
P-low
and removed
P-medium
labels
Aug 22, 2016
brson
referenced this issue
Sep 20, 2016
Closed
can't bootstrap compiler from the rust-src component because of file permissions #36488
steveklabnik
added
T-tools
and removed
A-tools
labels
Mar 24, 2017
Mark-Simulacrum
added
T-dev-tools
and removed
T-tools
labels
May 24, 2017
This comment has been minimized.
This comment has been minimized.
|
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.rs#1140 |
RalfJung
referenced this issue
Jun 3, 2017
Merged
set_file_perms: if the file is already executable, keep it executable #1141
Mark-Simulacrum
added
T-infra
and removed
A-infrastructure
labels
Jun 25, 2017
This comment has been minimized.
This comment has been minimized.
|
Yes, I am fairly certain (checked a few days back) this was fixed in the move towards a Rusty rust-installer. Closing. |
kori commentedMay 16, 2015
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