Re: mount --bind and -o [re: nosuid/noexec/nodev handling]

From: Ville Herva (vherva@mail.niksula.cs.hut.fi)
Date: Sun Oct 14 2001 - 12:23:36 EST


On Sun, 14 Oct 2001, Ville Herva wrote:
>
> $ mount --bind -o nosuid,noexec,ro /bin /tmp/test
> $ mount --bind -o nosuid,noexec,ro /bin /tmp/test
> $ mount --bind -o remount,nosuid,noexec,ro /tmp/test

Ignore the that, sorry.

For simplicity's sake, I changed the dirs in the above example. In reality
the situation was more like this:

/mnt1 and /mnt2 are separate fs's.

/mnt2/test1 is symlink to /mnt1/directory

then

mount --bind -o ro /mnt2/test1 /mnt2/test2
mount --bind -o remount,ro /mnt2/test2

but it seems I'm longer able to duplicate that either. (The reason I was
able to duplicate it in the first place was propably that the first hanging
mount process kept /mnt2/test1 somehow busy and I retried with mount --bind
-o ro /mnt2/test1 /mnt2/test3.)

I'll drop you a note if I figure out how to reproduce it.

BTW: This should be reproducible (for what it's worth):

$ mount
(...)
/dev/hde1 on /mnt/ext2-2 type reiserfs (rw,noatime,nodiratime)
$ touch /mnt/ext2-2/a
$ rm /mnt/ext2-2/a
$ mount --bind -o ro /mnt/ext2-2 /tmp/test
$ mount --bind -o remount,ro /tmp/test
$ mount
(...)
/dev/hde1 on /mnt/ext2-2 type reiserfs (rw,noatime,nodiratime)
/mnt/ext2-2 on /tmp/test type none (ro,bind)
$ touch /mnt/ext2-2/a
touch: /mnt/ext2-2/a: Read-only file system
$ umount /tmp/test
$ mount
(...)
/dev/hde1 on /mnt/ext2-2 type reiserfs (rw,noatime,nodiratime)
$ touch /mnt/ext2-2/a
touch: /mnt/ext2-2/a: Read-only file system
$ mount -o remount,rw /mnt/ext2-2
$ touch /mnt/ext2-2/a

 
-- v --

v@iki.fi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:54 EST