Share with you the rhel6 beginner's Note 3-Linux general technology-Linux technology and application information. The following is a detailed description. This is about ACL
Using acl, we can more accurately control the access permissions of each user to special files or folders in linux, and the acl takes precedence over common permissions, such as in the/tmp directory.
Exists in a directory named example. The permission is as follows:
Drwxr-xr-x 2 root 4096 May 24 example/
However, there are three users on the machine, usera, userb, and others, all of which are common users. For example, we want to meet the following permission requirements:
A. Other users can view the example directory normally.
B. usera can read, write, and browse the directory.
C. userb does not have any permissions on this directory
If the above requirements are configured using the general method, the requirements cannot be met. Therefore, we can use the acl permission in linux to meet the above requirements. The configuration method is as follows:
# Cd/tmp
# Setfacl-m u: usera: rwx example
# Setfacl-m u: userb: --- example
# Chmod o + rx example
Command usage
Configure acl
# Setfacl-m u: {u | g }:{ permissions} "file or directory" acl entry of the configuration file or directory
# Setfac-B "file or directory" delete redundant acl items
Retrieve the acl list
# Getfacl "file or directory"
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.