chmod -R: cannot access ...: Permission denied when gnuchmod gives Read-only file system
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
My downstream report for rust-coreutils=0.8.0-0ubuntu3: https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2152057 . Also tested 055a66b78ef86e3e18b0b96675f1e64110c1eac0
At https://askubuntu.com/q/1566581/1004020 , with ReadonlyRoot enabled, I tried
# chmod -R ugo+rX /lib/python3/dist-packages/
chmod: cannot access '/lib/python3/dist-packages/Onboard/__pycache__/OnboardGtk.pypy311.pyc': Permission denied
# chmod -R ugo+rX /lib/python3/dist-packages/Onboard/__pycache__/OnboardGtk.pypy311.pyc
# # See there's no error
It's similar for other subdirectories. Whereas with GNU coreutils:
root@daniel-desktop3:/lib/python3/dist-packages# chmod -R ugo+rX /lib/python3/dist-packages/zstandard
chmod: cannot access '/lib/python3/dist-packages/zstandard/__pycache__/__init__.pypy311.pyc': Permission denied
root@daniel-desktop3:/lib/python3/dist-packages# gnuchmod -R ugo+rX /lib/python3/dist-packages/zstandard
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/py.typed': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/_cffi.cpython-314-x86_64-linux-gnu.so': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/backend_cffi.py': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__init__.py': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/backend_c.cpython-314-x86_64-linux-gnu.so': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__init__.pyi': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__pycache__': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__pycache__/backend_cffi.cpython-314.pyc': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__pycache__/__init__.cpython-314.pyc': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__pycache__/backend_cffi.pypy311.pyc': Read-only file system
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/__pycache__/__init__.pypy311.pyc': Read-only file system
root@daniel-desktop3:/lib/python3/dist-packages# gnuchmod -R ugo+rX /lib/python3/dist-packages/zstandard/py.typed
gnuchmod: changing permissions of '/lib/python3/dist-packages/zstandard/py.typed': Read-only file system
The error message should be "Read-only file system" not "Permission denied".
Contributor guide
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
Start by reproducing recursive chmod with ReadonlyRoot enabled on the paths shown, then compare the Rust implementation's error handling with GNU chmod when the filesystem is read-only. Done means the command reports "Read-only file system" instead of "Permission denied" for the affected paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100