1, some friends often ask, setfacl-x or-M is how to use a usage, in fact, and-M,-X is a usage, system documents generally used,-m, X to do sample interpretation, add extended permissions to the file directory, generally rarely-X,-m to configure file ACL entries, may be some intentions of beginners Friend, will be a little catch.
The explanations in the document are:
The-m (--modify) and-m (--modify-file) options Modify the ACL of a file or directory
The-x (--remove) and-x (--remove-file) options Remove ACL entries
2,-m, the-x option parameter is a file, that is ^-^
For example: Configure a file acl.sh additional permissions as follows
Getfacl--omit-header acl.sh does not have ACL permissions configured as follows
user::rw-
group::r--
other::r--
Setfacl-m u:user1:rwx acl.sh Configuring ACL entries
Getfacl--omit-header acl.sh permissions after configuration
user::rw-
User:user1:rwx
group::r--
Mask::rwx
other::r--
Configuring ACL rule entries using-M
Echo-n ' U:USER1:RW ' > Acl.txt && setfacl-m acl.txt acl.sh
Getfacl--omit-header acl.sh Get the following
user::rw-
user:user1:rw-
group::r--
mask::rw-
other::r-
Modify the ACL entry method above,
Remove ACL entry is-x-x
Similarly above:
Setfacl-x U:user1 acl.sh
Echo-n ' U:user1 ' > Acl.txt && setfacl-x acl.txt acl.sh
----------------------------------END-------------------------------------------
Explanation of some options for Linux ACLs