使用setfacl设置文件访问权限
一、添加acl设置
setfacl -m u:<username>:rwx <file>
setfacl -m u:tom:r-- /etc/fstab
#用户tom对/etc/fstab文件只读二、移除acl设置
setfacl -x u:<username> <file>
setfacl -x u:tom /etc/fstab
#删除/etc/fstab文件的针对用户tom的访问控制三、查看文件的acl设置
getfacl <file>
getfacl /etc/fstab
#查看/etc/fstab文件的访问控制配置