What when Permissions List
A permission setting that adds a name to a file's permissions
-
How to view the list of permissions
[[email protected] mnt]# ls-l file
-rw-rw-r--<.| +> 1 root root 0 nov 7 09:14 file
If this bit is ".", on behalf of this there is no permission list
If this bit is "+", the list of permissions exists
[[email protected] mnt]# getfacl file
# file:file # #文件名称
# owner:root # #文件所有人
# group:root # #文件所有组
user::rw- # #所有人权限
user:student:rw- # #特定用户权限
group::r-- # #所有组权限
mask::rw- # # Maximum permissions for a specific user
other::r-- # #其他人权限
650) this.width=650; "Src=" https:// S3.51cto.com/wyfs02/m00/91/cb/wkiol1j4aild_mc-aagj0ors3dc906.png-wh_500x0-wm_3-wmp_4-s_3430516146.png "Title=" Screenshot from 2017-04-18 20-08-25.png "alt=" wkiol1j4aild_mc-aagj0ors3dc906.png-wh_50 "/>
How to set ACL permissions
Setfacl
Setfacl-m <u|g>:<username|groupname>: Permissions filename # #设定acl
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/91/CC/wKioL1j4auDzVu9CAAC1hs5jzzg428.png-wh_500x0-wm_ 3-wmp_4-s_2430082022.png "title=" screenshot from 2017-04-18 20-32-09.png "alt=" Wkiol1j4audzvu9caac1hs5jzzg428.png-wh_50 "/>
setfacl-x <u|g>:<username|groupname> FileName # #去除某个用户或者组的acl
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/91/CD/wKiom1j4a23wYXgIAADPHjznrAI706.png-wh_500x0-wm_ 3-wmp_4-s_3372150301.png "style=" Float:none; "title=" screenshot from 2017-04-18 20-33-43.png "alt=" Wkiom1j4a23wyxgiaadphjznrai706.png-wh_50 "/>
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M00/91/CC/wKioL1j4a23hPhRGAAClrOWiBQw173.png-wh_500x0-wm_ 3-wmp_4-s_601052649.png "style=" Float:none; "title=" screenshot from 2017-04-18 20-34-24.png "alt=" Wkiol1j4a23hphrgaaclrowibqw173.png-wh_50 "/>
Setfacl-b FileName # #删除文件上的权限列表
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/91/CD/wKiom1j4a27Re9MxAAClRi1WNlA589.png-wh_500x0-wm_ 3-wmp_4-s_3186358961.png "style=" Float:none; "title=" screenshot from 2017-04-18 20-38-04.png "alt=" Wkiom1j4a27re9mxaaclri1wnla589.png-wh_50 "/>
5.acl Default Permissions
The default permissions are used for the directory, which allows all new files in the directory to inherit this permission, which does not take effect on the directory itself and does not affect files that already exist in the directory
Setfacl-m d:<u|g|o>:<username|group>:rwx Directory # #设定默认权限
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/91/CD/wKiom1j4bIXSvuLeAAEKl74WA4g925.png-wh_500x0-wm_ 3-wmp_4-s_465893036.png "title=" screenshot from 2017-04-18 21-05-11.png "alt=" Wkiom1j4bixsvuleaaekl74wa4g925.png-wh _50 "/>
Setfacl-x d:<u|g|o>:<username|group> Directory # #撤销目录中的某条默认权限
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/91/CC/wKioL1j4adCzTAAxAADc6VwWjjE994.png-wh_500x0-wm_ 3-wmp_4-s_1898395700.png "title=" screenshot from 2017-04-18 21-06-17.png "style=" Float:none; "alt=" Wkiol1j4adcztaaxaadc6vwwjje994.png-wh_50 "/>
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/91/CD/wKiom1j4ac_QdO6zAAELxYxbxoU597.png-wh_500x0-wm_ 3-wmp_4-s_362944800.png "style=" Float:none; "title=" screenshot from 2017-04-18 21-05-41.png "alt=" wKiom1j4ac_ Qdo6zaaelxyxbxou597.png-wh_50 "/>
650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M02/91/CC/wKioL1j4ac_xoupbAADShSUq5qY511.png-wh_500x0-wm_ 3-wmp_4-s_3105941472.png "style=" Float:none; "title=" screenshot from 2017-04-18 21-06-06.png "alt=" wKioL1j4ac_ Xoupbaadshsuq5qy511.png-wh_50 "/>
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/91/CD/wKioL1j4bnriIV-wAADc6VwWjjE827.png-wh_500x0-wm_ 3-wmp_4-s_1758970625.png "title=" screenshot from 2017-04-18 21-06-17.png "alt=" Wkiol1j4bnriiv-waadc6vwwjje827.png-wh_50 "/>
ACL Mask and inheritance
A file with an ACL "has a mask" that can limit the maximum permissions for the group that owns the file, and can limit the maximum permissions that the supplemental users and groups in the ACL have
Setfacl-m M:rwxfile
The "directory can have default ACL" entry, which automatically sets these entries for new files created in the directory, similar to the Setgid permission method (for directories), so that new files created in that directory are owned by the group that owns the directory.
Setfacl-m D:U:BOB:RW Directory
Permissions List (Linux)