-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
C-bugCategory: bugCategory: bug
Description
Problem
When a build.rs is present, a non-owned and ill-permissioned directory in a Cargo project can cause Cargo to fail, even if it is in the .gitignore and in the package.exclude section.
Expected behaviour: cargo ignores the file/directory and checks the project correctly.
Observed behaviour: the following error:
error: cannot read "reprod/undelveable"
Caused by:
Permission denied (os error 13)
Steps
Run the following script to reproduce:
#!/bin/sh
cargo new reprod
cd reprod
echo "fn main() {}" >> build.rs
mkdir undelveable
echo "undelveable/" >> .gitignore
sed -i 's/edition = "2018"/edition = "2018"\nexclude = ["undelveable"]/' Cargo.toml
chmod 0711 undelveable
touch undelveable/unreadable
sudo chown root:root undelveable
cargo checkNotes
- cargo 1.42.0 (8633429 2020-01-31)
- Pop!_OS Ubuntu-based Linux distribution
- Stable cargo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bug