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?
Add a comment
|
1 Answer
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
-
1It is documented in the FreeBSD
setfacl
manual page. It was also in the original TRUSIX Rationale's manual page for thesetacl
command.– JdeBPCommented 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