I ran

sudo setfacl -d -m g::rwx /tmp

then went into /tmp and created a file and looked at its permissions:

-rw-rw-rw-. 1 jm wheel 0 Aug 24 10:26 test_file

then I ran

sudo chmod g+rwx test_file

and looked at the permissions:

-rwxrwxrwx. 1 jm wheel 0 Aug 24 10:26 test_file

shouldn't the first command setfacl -d -m g::rws /tmp have given it executable permissions in the first place? why did I have to run chmodto get them?


why did I have to run chmod to get them?

Because you are doing it wrong! Try:

setfacl -Rdm g:maulinglawns:rwx tmp/
touch tmp/foo
getfacl tmp/foo 
# file: tmp/foo
# owner: maulinglawns
# group: maulinglawns
group::r-x          #effective:r--
group:maulinglawns:rwx      #effective:rw-

And here is what ls says (note the + sign at the end, it indicates that we indeed have an acl set):

ls -l tmp/
totalt 0
-rw-rw-r--+ 1 maulinglawns maulinglawns 0 aug 24 18:55 foo

Please read the man page for setfacl. Especially the ACL ENTRIES part.

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.