Summary
After rustup update / toolchain install on Linux, binaries under $RUSTUP_HOME/toolchains/*/bin/ can be installed with mode 644 (-rw-r--r--) instead of 755, causing immediate failures:
error: Permission denied (os error 13)
when invoking cargo, rustc, rustfmt, etc.
Environment
- OS: Linux x86_64 (ext4)
- rustup: 1.29.0 (28d1352 2026-03-05)
- RUSTUP_HOME:
~/.rustup (default)
- umask:
022
- Reproduced: 2026-06-08 after
rustup update stable
Steps to reproduce
rustup --version
rustup update stable # or: rustup toolchain install stable
find "$RUSTUP_HOME/toolchains" -path '*/bin/*' -type f ! -perm -111 -print | head
stat -c '%a %n' "$RUSTUP_HOME/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo"
cargo --version # may fail with os error 13 if 644
Expected behaviour
Toolchain binaries under toolchains/*/bin/ are executable (mode includes +x, typically 755 with umask 022).
Actual behaviour
Some or all toolchain bin/* files are 644. The rustup shim itself remains executable; only unpacked toolchain components are affected.
Impact
Breaks CI runners and automation that calls cargo/rustfmt immediately after a toolchain refresh.
Workaround
find "$RUSTUP_HOME/toolchains" -path '*/bin/*' -type f ! -perm -111 -exec chmod +x {} +
Additional notes
- Default
~/.rustup was used (no custom relocation).
- Historical toolchains on the same host also showed 644 on
bin/*, suggesting unpack/install rather than backup restore.
Summary
After
rustup update/ toolchain install on Linux, binaries under$RUSTUP_HOME/toolchains/*/bin/can be installed with mode 644 (-rw-r--r--) instead of 755, causing immediate failures:when invoking
cargo,rustc,rustfmt, etc.Environment
~/.rustup(default)022rustup update stableSteps to reproduce
Expected behaviour
Toolchain binaries under
toolchains/*/bin/are executable (mode includes+x, typically 755 with umask 022).Actual behaviour
Some or all toolchain
bin/*files are 644. Therustupshim itself remains executable; only unpacked toolchain components are affected.Impact
Breaks CI runners and automation that calls
cargo/rustfmtimmediately after a toolchain refresh.Workaround
Additional notes
~/.rustupwas used (no custom relocation).bin/*, suggesting unpack/install rather than backup restore.