Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84207 - read-only mount --bind isn't read-only
Summary: read-only mount --bind isn't read-only
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mount
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-13 14:26 UTC by John Haxby
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-02-21 18:51:46 UTC

Attachments (Terms of Use)

Description John Haxby 2003-02-13 14:26:01 UTC
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 20:23:45 UTC
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 18:51:46 UTC
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.