openvax / openvax/datacache

Copying files with shutil.move will fail on SELinux

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.