Hi I am wondering what is the difference between the two sets of commands below:

1) To allow Davis to access and modify all files and folders in the the home directory of John

# setfacl -m u:davis:rwx:/home/john
# setfacl -m d:u:davis:rwx:/home/john 

2) To allow Davis to access the home directory of John and all recursive files and folders.

# setfacl -R -m u:davis:rwx:/home/john

First command gives rights to davis on the directory itself, the second one sets the default ACL entry for new files that get created. The last one sets all files and directories to give davis rwx access.

TBH if you're going to do the last command, the first one seems a little redundant since recursive setfacl's also hit the directory you give it.

| improve this answer | |
  • Do you meant the two sets of commands works exactly the same way, but the 2nd set is better as it is much more stright forward? Thanks. – Win.T Jan 9 '15 at 4:21
  • I mean the last setfacl accomplishes 100% of the effect of the first one as part of how setting permissions recursively does. You could leave the first one off and end up at the same point. – Bratchley Jan 9 '15 at 15:12
  • yup so my understanding was correct. Thanks for explaining! =) – Win.T Jan 9 '15 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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