Skip to contentSkip to conversation

bind mounts and options

DISCUSSION Attila Kinali 3 participants 4 messages Oct 28, 2005 – Oct 29, 2005 VFS

lore
Share & tools
lore
#0 lore raw

Moin,

I wanted to ask whether there is a technical reason why bind mounts do not honour options passed to it.

It would be a really cool feature to be able to mount certain parts of the file system into a chroot enviroment read only, so that it couldnt be modified, but still be changed by a user outside the chroot.

At least i've seen a few patches floating around that add at least the ro option, so i guess it should not be too hard.

Attila Kinali

#1 lore raw
Quoted 11 lines · Attila Kinali

Moin,

I wanted to ask whether there is a technical reason why bind mounts do not honour options passed to it.

It would be a really cool feature to be able to mount certain parts of the file system into a chroot enviroment read only, so that it couldnt be modified, but still be changed by a user outside the chroot.

Quoted 3 lines

At least i've seen a few patches floating around that add at least the ro option, so i guess it should not be too hard.

A bind mount to a different location creates a new mount-instance of the underlying filesytem.
If the underlying filesystem can handle multiple instances of itself being mounted with different read-options, this should be possible. But I dont think currently that is the case.

RP

Quoted 6 lines

Attila Kinali
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 12 lines · Ram Pai
Quoted 11 lines · Attila Kinali

Moin,

I wanted to ask whether there is a technical reason why bind mounts do not honour options passed to it.

It would be a really cool feature to be able to mount certain parts of the file system into a chroot enviroment read only, so that it couldnt be modified, but still be changed by a user outside the chroot.

Quoted 8 lines
Quoted 3 lines

At least i've seen a few patches floating around that add at least the ro option, so i guess it should not be too hard.

A bind mount to a different location creates a new mount-instance of the underlying filesytem.
If the underlying filesystem can handle multiple instances of itself being mounted with different read-options, this should be possible. But I dont think currently that is the case.

one could create a really simple stackable file system that did this, use fist, generate base0fs, and edit the code to disallow all function paths that can change the filesystem. It's not a complete situation, as meta data (access time...) would still be updated.

#3 lore raw
In reply to Ram Pai
Quoted 5 lines · On Fri, 28 Oct 2005 11:18:34 -0700 Ram Pai <[email protected]> wrote:

A bind mount to a different location creates a new mount-instance of the underlying filesytem.
If the underlying filesystem can handle multiple instances of itself being mounted with different read-options, this should be possible. But I dont think currently that is the case.

Well, the patch at http://www.13thfloor.at/patches/ seems to do that. Though i have to admit that i hardly know anything about the vfs system, so i cannot say whether it does it the right way and whether it works in all cases.

Attila Kinali

Signature · 2 lines
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
			-- reeler in +kaosu