Bug 84207 - read-only mount --bind isn't read-only
read-only mount --bind isn't read-only
Status: CLOSED DUPLICATE of bug 77962
Product: Red Hat Linux
Classification: Retired
Component: mount (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brian Brock
Depends On:
Blocks: 164572
  Show dependency treegraph
Reported: 2003-02-13 09:26 EST by John Haxby
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:51:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Haxby 2003-02-13 09:26:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

Description of problem:
I wanted to bind-mount a directory read-only so that I could safely make it
visible through ftp, but, alas, it isn't read-only 00 it looks as though the
read-only flag is ignored even though it appears in the output of "mount".

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. mkdir /tmp/xxx /tmp/yyy
2. mount -o ro,bind /tmp/xxx /tmp/yyy
3. touch /tmp/yyy/this-should-not-work

Actual Results:  Each command reports everything OK and the file is created.

Expected Results:  I was rather hoping to get a "read-only filesystem" error.

Additional info:

"mount | grep /tmp" shows

    /tmp/xxx on /tmp/yyy type none (ro,bind)

which rather suggests that /tmp/yyy should be read-only, but "grep /tmp
/proc/mounts" shows

    /dev/sheep/root /tmp/yyy reiserfs rw 0 0

which rather suggests it doesn't.  I have an ext3 bind as well which exhibits
the same characteristics.

This is with kernel-2.4.18-24.8.0 and mount-2.11r-10.

This may well be a combination between a bug and an enhancement request if the
kernel doesn't support a read-only bind.
Comment 1 Elliot Lee 2003-07-30 16:23:45 EDT
Can't change mount options with --bind

*** This bug has been marked as a duplicate of 77962 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:51:46 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.