Explanation of some options for Linux ACLs

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.