[Samba] chown destroys ACLs

Rowland Penny rowlandpenny at googlemail.com
Thu Jul 17 08:02:26 MDT 2014

On 15/07/14 13:24, Klaus Hartnegg wrote:
> Hi,
> Is it normal that "chown $user $file" and "chown :$group $file" 
> destroy the Windows-ACLs?
> Is it normal that changing the file owner in Windows does not change 
> the file owner in Linux, but changing the file owner in Linux does 
> change the file owner in Windows?
> This should be mentioned in
>> https://wiki.samba.org/index.php/Setup_and_configure_file_shares_with_Windows_ACLs 
> I'm using samba 4.1.6 of Ubuntu 14.04 with "server role = classic 
> primary domain controller". File system is ext4, it is mounted with 
> options acl,user_xattr, and the file smb.conf does contain the three 
> entries
> fs objects = acl_xattr
> map acl inherit = Yes
> store dos attributes = Yes
> thanks,
> Klaus
You posted 'fs objects = acl_xattr' was this a typo? also do you have 
the 'attr' package installed.

A quick test by creating a test dir by root and adding a users ACL with 
setfacl and then changing the owner and group via chmod & chgrp never 
touched the ACL.

I would also like to point out that changing /etc/fstab is no longer 
required on Debian & Ubuntu if you use ext4 (hint, hint Marc ;-) )

Having said all that, why are you altering the ownership of the 
directories and files on Linux, set them (as per the wiki) once on 
linux, then set or change them from a windows client.

If you don't have any windows clients, learn how to use setfacl.


More information about the samba mailing list