HowTo allow extended attributes on CIFS / Samba

Status
Not open for further replies.

Tekkie

Patron
Joined
May 31, 2011
Messages
352
I've got a small problem with my CIFS/Samba ACL's and I can't find a nice way of solving it in FreeNAS.

When I try to robocopy data from my old TeraStation to my FreeNAS system using CIFS the files are copied just fine except the copy fails at the last step which is the time-stamping, robocopy reports 'Access is denied'.

However the file is already copied and in perfect health, except for the creation/modification dates, those are current rather than what they were on the old TeraStation.

Is there an option in FreeNAS to allow extended attribute changes on CIFS/Samba shares? Or do I need to go into the samba config file directly for this to work?
 

maglaubig

Dabbler
Joined
Sep 29, 2012
Messages
17
Change the ACL - from a SSH session. It's likely you won't be able to do this from the web GUI:

Code:
[root@freenas] getfacl /mnt/fs01
# file: /mnt/fs01
# owner: root
# group: wheel
            group@:rwxp--a-R-c--s:fd----:allow
         everyone@:rwxp--a-R-c--s:fd----:allow
            owner@:rwxpDdaARWcCos:fd----:allow


To change the permissions by default, change them on the underlying location:

Code:
[root@freenas] setfacl -m group@:rwxpDdaARWcCos:fd----:allow /mnt/fs01
[root@freenas] setfacl -m everyone@:rwxpDdaARWcCos:fd----:allow /mnt/fs01


Then verify they're set correctly:

Code:
[root@freenas] getfacl /mnt/fs01
# file: /mnt/fs01
# owner: root
# group: wheel
            group@:rwxpDdaARWcCos:fd----:allow
         everyone@:rwxpDdaARWcCos:fd----:allow
            owner@:rwxpDdaARWcCos:fd----:allow


Robocopy with the /MIR switch will work now as expected because the necessary permissions have been granted. You may have to apply the above to existing files, but it'll work for everything moving foward.
 
Status
Not open for further replies.
Top