Bug 12487 - Mount option request - respect file_mode= when Unix extensions are active
Mount option request - respect file_mode= when Unix extensions are active
Status: NEW
Product: CifsVFS
Classification: Unclassified
Component: kernel fs
All Linux
: P5 enhancement
: ---
Assigned To: Steve French
Depends on:
  Show dependency treegraph
Reported: 2016-12-28 02:07 UTC by Adam Nielsen
Modified: 2016-12-28 02:07 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Adam Nielsen 2016-12-28 02:07:49 UTC
Currently when mounting a share from Samba and Unix extensions are active, the "file_mode" and "dir_mode" options are ignored.  I would like to request a new option called "forcemode" which behaves just like "forceuid", only it affects these file/dir modes rather than the uid/gid.

The reason for this request is that Unix extensions are often the only way to get symlinks working across a CIFS mount.  But when the server permissions don't line up with the client, you can *almost* work around the problem but not quite.

You can use "uid=" and "forceuid" to get the correct local user set, even when Unix extensions are enabled.  Access is then enforced locally (if the mode is set appropriately) so that other local users cannot access the share.  This is perfect when the server-side file/dir modes are good.

However if the server-side file/dir modes are not what you want, there is no equivalent to "forceuid" to override the modes on the client side.  This means you have to either use "noperm" to disable ALL permission checking (so now "forceuid" is superfluous, the local mount is public) or disable Unix extensions entirely (so no symlinks.)

It would be extremely useful to have a way for "file_mode=" and "dir_mode=" to still be respected when Unix extensions are active, as it would address this scenario nicely.