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):
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
foo is created in /tmp/test/foo and is shown in the ls command.
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.
Step 4 should be:
ls -la /foo
I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the fedora kernel.
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.
I can confirm it with 188.8.131.52-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...
Okay thanks Bill. I'm re-assigning to the filesystem maintainer and he may be
able to comment further.
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.