Copying files with shutil.move will fail on SELinux
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5
- Forks
- 7
- Avg merge
- 2h 44m
- Merged PRs (30d)
- 3
Description
shutil.move will use copy2 as a fallback if os.rename fails. copy2 works in two stages: (1) actually copying the file and (2) adjusting its permissions. Step 2 will fail, though the copied file exists at the desired destination. This is supposed to only happen between file systems but @julia326 observed it in a situation that we think is the same file system.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a repository file or test. Start by locating the code that uses shutil.move and reproduce the SELinux failure around the copy2 fallback; done means moving the file succeeds without leaving an incomplete or incorrectly permissioned destination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100