setfacl usage

Conor Calby

Dabbler
Joined
Jul 29, 2013
Messages
13
Hello,

I have a directory which shows up under SSH but not on my Windows share (CIFS).
I have tried to CHMOD the folder but I get
Code:
chmod: SAS Who Dares Wins2: Operation not permitted


Directory (SAS Who Dares Wins2) has permissions as follows (from ls -la):
Code:
drwx------   9 media         public   11 Mar  6 19:41 SAS Who Dares Wins2/

And using the getfacl command we see the permissions are
Code:
[root@mediasrv2] /mnt/Data/Public/TV Shows# getfacl SAS*
# file: SAS Who Dares Wins2
# owner: media
# group: public
            owner@:rwxp--aARWcCos:------:allow
            group@:------a-R-c--s:------:allow
         everyone@:------a-R-c--s:------:allow


There is another directory (Celebrity Juice) which does work and is visible on my computer... which has different permissions
Code:
drwxrwxr-x   2 media         public   28 Feb 24 20:06 Celebrity Juice/

Code:
[root@mediasrv2] /mnt/Data/Public/TV Shows# getfacl "Celebrity Juice"
# file: Celebrity Juice
# owner: media
# group: public
            owner@:rwxp--aARWcCos:------:allow
            group@:rwxp--a-R-c--s:------:allow
         everyone@:r-x---a-R-c--s:------:allow


Any idea how I can 'copy' the permissions from the Celebrity Juice folder to the SAS Who Dare Wins2 folder.

Many thanks,
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello,

I have a directory which shows up under SSH but not on my Windows share (CIFS).
I have tried to CHMOD the folder but I get
Code:
chmod: SAS Who Dares Wins2: Operation not permitted


Directory (SAS Who Dares Wins2) has permissions as follows (from ls -la):
Code:
drwx------   9 media         public   11 Mar  6 19:41 SAS Who Dares Wins2/

And using the getfacl command we see the permissions are
Code:
[root@mediasrv2] /mnt/Data/Public/TV Shows# getfacl SAS*
# file: SAS Who Dares Wins2
# owner: media
# group: public
            owner@:rwxp--aARWcCos:------:allow
            group@:------a-R-c--s:------:allow
         everyone@:------a-R-c--s:------:allow


There is another directory (Celebrity Juice) which does work and is visible on my computer... which has different permissions
Code:
drwxrwxr-x   2 media         public   28 Feb 24 20:06 Celebrity Juice/

Code:
[root@mediasrv2] /mnt/Data/Public/TV Shows# getfacl "Celebrity Juice"
# file: Celebrity Juice
# owner: media
# group: public
            owner@:rwxp--aARWcCos:------:allow
            group@:rwxp--a-R-c--s:------:allow
         everyone@:r-x---a-R-c--s:------:allow


Any idea how I can 'copy' the permissions from the Celebrity Juice folder to the SAS Who Dare Wins2 folder.

Many thanks,

I wrote a tool for that :)
winacl -a clone -s <source path> -p <destination path> If you want to set it recursively and watch it go, winacl -a clone -rv -s <source path> -p <dest path>
 

Conor Calby

Dabbler
Joined
Jul 29, 2013
Messages
13
Hi Anodos,

I probably should have mentioned, I have FreeNas 9.3 Stable.
I imagine this is the reason I get this message?
Code:
winacl: invalid action

 

Conor Calby

Dabbler
Joined
Jul 29, 2013
Messages
13
I have sorted it for now by removing ACL for the directory using the following command and then CHMOD
Code:
find "<<DIRECTORY>>" -type d -exec setfacl -b {} +

But would be interested if there is a way to just copy the ACL of one directory to the other.
 
Top