containers / containers/fuse-overlayfs
Failure to replace a file that is non-writable in lower dir
- Dominant language
- Rust
- Stars
- 691
- Forks
- 109
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 2
Description
Context: trying to remaster an ISO by just fuse-mounting and modifying the overlay to generate a new ISO, without doing useless file copies. `fuseiso` gives me a filesystem where all files appear as readonly (and even owned by root).
There should be no reason to be unable to replace such a file in an overlay, but something seems to just prevent it:
```
$ mkdir lower upper work merged
$ touch lower/foo lower/bar
$ chmod -w lower/bar
$ fuse-overlayfs -o lowerdir=lower,upperdir=upper,workdir=work merged/
$ mv merged/foo merged/foo0
$ mv merged/bar merged/bar0
mv: cannot move 'merged/bar' to 'merged/bar0': Permission denied
$ rm merged/bar
rm: remove write-protected regular empty file 'merged/bar'? y
rm: cannot remove 'merged/bar': Permission denied
$ echo "new contents" > merged/bar
bash: merged/bar: Permission denied
```
This can be worked around by adding updated files manually in upper dir, but it kinda defeats the purpose in the general case :)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report with the lower, upper, work, and merged directories and the fuse-overlayfs mount command shown. Then trace the overlay permission handling for renaming, removing, and writing files from a non-writable lower directory. Done means those operations work through the mounted overlay without manually editing upperdir.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100