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_ACLsI'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
On Tue, Jul 15, 2014 at 02:24:20PM +0200, Klaus Hartnegg wrote:> Hi, > > Is it normal that "chown $user $file" and "chown :$group $file" > destroy the Windows-ACLs?If the hash of the Windows + POSIX ACL changes, the stored Windows ACL will get tossed, so yes - it is.> 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?chown from a Windows client will only succeed if you're accessing as root - so no, it usually won't change the file owner on the Linux filesystem. If you are local root and change the owner then yes it will be reflected in the Windows ownership. See hash comment above. Jeremy.
On 10:31:58 wrote Klaus Hartnegg:> Hi, > > Is it normal that "chown $user $file" and "chown :$group $file" > destroy the Windows-ACLs?According to your settings, yes.> 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?According to your settings, yes.> This should be mentioned in > > > https://wiki.samba.org/index.php/Setup_and_configure_file_shares_wi > > th_Windows_ACLsI agree.> 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_xattrRemove this setting and try again. read man vfs_acl_xattr Or follow this page: https://wiki.samba.org/index.php/Setup_and_configure_file_shares_with_POSIX_ACLs> map acl inherit = Yes > store dos attributes = Yes > > thanks, > Klaus-- Regards Harry Jede
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, > KlausYou 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. Rowland