Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a local directory /var/foo

I'd like it so that any file created in here can be read and written by any user (and any directory can be rwx).

I've tried chacl -b u::rwx,g::rwx,o::rw- u::rwx,g::rwx,o::rwx /var/foo

and then when I run getfacl /var/foo it seems these permissions are there, but then I can't even ls /var/foo any more.

There are no existing files or directories in there, but there are going to be, and I need to make sure they are world-write and -readable.

share|improve this question
up vote 1 down vote accepted

As documented in man setfacl you set default ACLs by prepending them with default:.

setfacl -m default:u::rwx,default:g::rwx /var/foo
share|improve this answer
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... – Rory Sep 3 '12 at 14:48
Should have been setfacl -m ..., @Blazemore. – grawity Sep 3 '12 at 16:41
@grawity Indeed. I mistakenly skipped the -m when posting my answer. Thanks for fixing. – Ansgar Wiechers Sep 3 '12 at 16:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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