acl(基于磁盘)
打開acl功能
mount -o acl /dev/sda6 /opt/ 或者 tune2fs -o acl /dev/sda6
getfacl file/dir
setfacl -m u:tom:rw aa.txt ? 設置用戶的acl
[root@localhost ~]# ll aa.txt
-rw-rw-r--+ 1 root root 9 07-25 12:16 aa.txt ?#權限位后+,以acl的設置為準
[root@localhost ~]# getfacl aa.txt
# file: aa.txt
# owner: root
# group: root
user::rw-
user:tom:rw- ? ---------------tom權限
group::r--
mask::rw-
other::r--
setfacl -m g:robin:rw aa.txt ?設置組的acl
setfacl -m o:rwx aa.txt ? ?設置其他人acl
setfacl -m m:r aa.txt ? 修改mask值 用于約束額外的用戶和組權限
setfacl -x u:tom aa.txt ?移除某個用戶acl
setfacl -x g:robin aa.txt ?移除某個組的acl
setfacl -b aa.txt ?徹底刪除facl設置
轉載于:https://blog.51cto.com/7277090/1274635
總結
- 上一篇: linux 构建 无线网络 过程
- 下一篇: [HDU]2098分拆素数和