[Samba] Inherit permissions of destination during file move.

Lee Humphreys lee.humphreys at 3n1gm4.co.uk
Mon Oct 10 13:21:57 UTC 2016


Hi all, 

We have a Linux host sharing a folder out via Samba.
The Linux host has underlying ACLs set on the files using setfacl to grant local Linux groups permissions on the files and folders.
The users of Samba are then placed into groups which in turn grant them these permissions via Samba when accessing the files and folders from a Windows RDP Server applying the correct permissions.
This is all working as expected however when a user drags and drops a file from folder to folder the parent permissions (and ACLs set with setfacl) go with the file (as usually expected).

The ask is that when a user moves a file in Samba using Windows explorer the file inherits the permissions of the target folder not keeps the permissions of the source. 

Below is our config:

[global]
log level = 1
log file = /var/log/samba/log.%m
max log size = 5000
netbiosname = sambahost
guest ok = no
browsable = no
vfs objects = acl_xattr
inherit acls = yes
inherit owner = no
inherit permissions = yes
map acl inherit = yes
name resolve order = host
security = user
encrypt passwords = yes
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
local master = no
disable netbios = yes
web port = 0
passdb backend = tdbsam
hosts allow = x.x.x.x,y.y.y.y
smb ports = 445
 
[SHARED]
comment = Shared
path = /path/to/folder
vfs objects = recycle acl_xattr
recycle:repository = /path/to/folder/home/%u/recyclebin
recycle:keeptree = yes
recycle:versions = yes
writeable = yes
read only = no
valid users = @ALLOWED_SAMBA_USERS

Is it possible to change the usual preserve permissions during a move operation so that we can meet the ask?

Thanks

Lee





More information about the samba mailing list