Setting differing ACLs on directories and files

Posted by durandal on Super User See other posts from Super User or by durandal
Published on 2010-08-25T14:05:49Z Indexed on 2010/12/22 1:56 UTC
Read the original article Hit count: 199

Quick ACL question:

I want to set up default permissions for a file share so that everyone can rwx all of the directories and so that all newly created files are rw. Everyone who is accessing this share is in the same group, so this isn't a concern. I have looked at doing this via ACLs without changing all of the users' umasks and such. Here are my current invocations:

setfacl -Rdm g:mygroup:rwx share_name
setfacl -Rm g:mygroup:rwx share_name

My problem is that while I want all of the newly created sub-directories to be rwx, I only want newly created files to be rw. Does anyone have a better method to achieve my desired end-result? Is there some way to set ACLs on directories separately from files, in a similar vein to "chmod +x" vs. "chmod +X"?

Thanks

© Super User or respective owner

Related posts about linux

Related posts about permissions