getfacl命令是获取文件访问控制列表。
使用方法
getfacl [-aceEsRLPtpndvh] 文件 ...
参数
-a, --access 仅显示文件访问控制列表
-d, --default 仅显示默认的访问控制列表
-c, --omit-header 不显示注释表头
-e, --all-effective 显示所有的有效权限
-E, --no-effective 显示无效权限
-s, --skip-base 跳过只有基条目(base entries)的文件
-R, --recursive 递归显示子目录
-L, --logical 逻辑遍历(跟随符号链接)
-P, --physical 物理遍历(不跟随符号链接)
-t, --tabular 使用制表符分隔的输出格式
-n, --numeric 显示数字的用户/组标识
-p, --absolute-names 不去除路径前的 '/' 符号
-v, --version 显示版本并退出
-h, --help 显示本帮助信息
实例
[root@localhost ~]# getfacl test #查看acl权限列表
# file: test
# owner: root
# group: root
user::r-x
user:tank:rwx
#effective:---
group::r-x
#effective:---
mask::---
other::---
[root@localhost ~]# getfacl -c test #查看acl权限,省略头信息
user::r-x
user:tank:rwx
#effective:---
group::r-x
#effective:---
mask::---
other::---