I have a directory with the following default ACLs:

default:user:phptutor:rwx

However, none of the files/directories in that directory have that default permission (because it was added after they were created).

How can I copy the default ACLs of a parent directory to every folder and file in it?

link|improve this question
feedback

1 Answer

up vote 5 down vote accepted

Use getfacl to get the default permissions from the directory and then pipe the result into setfacl to apply it. Something like this should work:

getfacl -d <directory> | setfacl -R --set-file=- <directory>
link|improve this answer
Thanks, Tom! That worked incredibly well! – hopeseekr Jul 1 '11 at 12:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.