14

The command setfacl -dm g::rwx mydir sets permissions for groups to read-write-execute. I'd like to run a similar command such that other users (i.e. not the owner) have no access whatsoever, but setfacl -dm o:: mydir complains that option -m is incomplete. What is the proper way of expressing this?

1 Answer 1

18

An empty permission set can be represented with -:

setfacl -dm o::- mydir

This doesn't appear to be documented, so I don't know how portable it is. However, the documentation does mention that they can be specified as an octal digit (4 r, 2 w, 1 x, as in chmod), so:

setfacl -dm o::0 mydir
2
  • 1
    It is documented in the FreeBSD setfacl manual page. It was also in the original TRUSIX Rationale's manual page for the setacl command.
    – JdeBP
    Commented Jun 14, 2015 at 13:35
  • Brilliant, thank you! I'm glad (in a sense) that the documentation is lacking -- I was beginning to think I just wasn't "getting it"! Commented Jun 14, 2015 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .