Description of problem: Even though the read only option is accepted for bind mounts, it does not work. Directories which are bind mounted as read only are still writable. I believe this feature use to work. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. mkdir -p /tmp/test 2. mount -o ro,bind / /tmp/test 3. touch /tmp/test/foo 4. ls -la /tmp/foo Actual results: foo is created in /tmp/test/foo and is shown in the ls command. Expected results: Either mount should complain that ro is an invalid option when used with bind, or it should not be possible to create files in /tmp/test. Additional info:
Step 4 should be: ls -la /foo
Hello Bill, I'm reviewing this bug as part of the kernel bug triage project, an attempt to isolate current bugs in the fedora kernel. http://fedoraproject.org/wiki/KernelBugTriage I am CC'ing myself to this bug and will try and assist you in resolving it if I can. There hasn't been much activity on this bug for a while. Could you tell me if you are still having problems with the latest kernel? If the problem no longer exists then please close this bug or I'll do so in a few days if there is no additional information lodged. Cheers Chris
I can confirm it with 2.6.22.5-76.fc7
Yes. The read only option is still ignored. Perhaps the correct solution is not to try and make the kernel respect the "ro" option, but to have mount give an error when trying to use the "ro" option with a bind mount... Bill
Okay thanks Bill. I'm re-assigning to the filesystem maintainer and he may be able to comment further. Cheers Chris
The code to support read-only bind mounts is only now being reviewed, so this won't be fixed until at least kernel 2.6.24.