一 最大有效ACL权限mask
mask是用来指定最大有效权限的。如果给用户赋予了ACL权限,是需要和mask的权限“相与”才能得到用户的真正权限。
[[email protected] home]# getfacl av/
# file: av/
# owner: tony
# group: stu
user::rwx
user:lw:r-x
group::rwx
mask::rwx
other::---
 
二修改最大有效权限
setfacl -m m:rx 文件名
设定mask权限为r-x。使用“m:权限”格式
[[email protected] home]# setfacl -m u:lw:rwx /home/av
[[email protected] home]# getfacl av
# file: av
# owner: tony
# group: stu
user::rwx
user:lw:rwx
group::rwx
mask::rwx
other::---
 
[[email protected] home]# setfacl -m m:rx av
[[email protected] home]# getfacl av
# file: av
# owner: tony
# group: stu
user::rwx
user:lw:rwx #effective:r-x
group::rwx #effective:r-x
mask::r-x
other::---
 
三 删除ACL权限

Linux中ACL最大权限与删除
 

Linux中ACL最大权限与删除
 
 
四 实战
[[email protected] home]# setfacl -m u:tony:rx av
[[email protected] home]# getfacl av
# file: av
# owner: tony
# group: stu
user::rwx
user:tony:r-x
user:lw:rwx
group::rwx
mask::rwx
other::---
 
[[email protected] home]# setfacl -x u:lw av
[[email protected] home]# getfacl av
# file: av
# owner: tony
# group: stu
user::rwx
user:tony:r-x
group::rwx
mask::rwx
other::---
 
[[email protected] home]# setfacl -b av
[[email protected] home]# getfacl av
# file: av
# owner: tony
# group: stu
user::rwx
group::rwx
other::---

相关文章:

  • 2022-01-12
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2021-07-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-03
  • 2021-08-16
  • 2021-07-20
  • 2021-11-08
  • 2021-09-22
  • 2021-12-21
相关资源
相似解决方案