ovl: default permissions
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 15:11:44 +0000 (17:11 +0200)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 15:11:44 +0000 (17:11 +0200)
commit8d3095f4ad47ac409440a0ba1c80e13519ff867d
treedad58c7957fd832f1b7fbcbaa8a8fb0091177187
parent5ffdbe8bf1e485026e1c7e4714d2841553cf0b40
ovl: default permissions

Add mount option "default_permissions" to alter the way permissions are
calculated.

Without this option and prior to this patch permissions were calculated by
underlying lower or upper filesystem.

With this option the permissions are calculated by overlayfs based on the
file owner, group and mode bits.

This has significance for example when a read-only exported NFS filesystem
is used as a lower layer.  In this case the underlying NFS filesystem will
reply with EROFS, in which case all we know is that the filesystem is
read-only.  But that's not what we are interested in, we are interested in
whether the access would be allowed if the filesystem wasn't read-only; the
server doesn't tell us that, and would need updating at various levels,
which doesn't seem practicable.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c
This page took 0.028494 seconds and 5 git commands to generate.