[Samba] ACLs on Samba share not preserved when copying with Windows Explorer

Andrew Martin amartin at xes-inc.com
Mon Aug 10 19:51:45 UTC 2015


I have a samba share (using Samba 3.6.3) running on an ext4 filesystem with the 
"acl" mount option. The samba share is configured as follows:
[myshare]
   path = /srv/myshare
   browseable = no
   public = no
   guest ok = no
   writable = yes
   printable = no
   create mode = 0660
   directory mode = 0770
   level2 oplocks = no
   oplocks = no

I have configured the following ACLs on the /srv/myshare directory:
# file: myshare
# owner: root
# group: root
# flags: -s-
user::rwx
user:user1:rwx
user:user2:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:user:user1:rwx
default:user:user2:rwx
default:group::rwx
default:mask::rwx
default:other::---</pre>

Note that this directory is owned by root:root and has the sgid bit set. User1
connects via Windows Explorer on Windows 7 and creates some directories inside
of /srv/myshare. If he saves files directly from a 3rd party program, e.g 
LibreOffice, into one of these subdirectories, the files inherit the ACLs 
correctly. However, if he copies a file via Windows Explorer into one of these
newly-created subdirectories, all ACLs are removed from said file:
# file: test.pdf
# owner: user1
# group: root
user::rwx
group::rwx
other::---

Strangely, if he performs the same operation, copying the same file with 
Windows Explorer to the root of the share, /srv/myshare, rather than a 
subdirectory, the permissions are preserved correctly:
# file: test.pdf
# owner: user1
# group: root
user::rw-
user:user1:rwx
user:user2:rwx
group::rwx
mask::rwx
other::---

Has anyone encountered this problem, or do you know what I can do to make
ACLs inherit as expected?

Thanks,

Andrew Martin



More information about the samba mailing list