版权声明:原创作品,谢绝转载!否则将追究法律责任。 |
上次看了一位网友关于ACL使用的文章,感受很深,因为本人最近也在为如何能够详细划分Linux文件权限而烦脑,经过本人一段时间研究,发现操作很Easy。只要大家好好看看下面两个命令的使用方式就能非常简单的完成你想要的结果。 祝大家好运。 呵呵!! Setfacl ---设置
setfacl 2.2.23 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... -m, --modify=acl modify the current ACL(s) of file(s) -M, --modify-file=file read ACL entries to modify from file -x, --remove=acl remove entries from the ACL(s) of file(s) -X, --remove-file=file read ACL entries to remove from file -b, --remove-all remove all extended ACL entries -k, --remove-default remove the default ACL --set=acl set the ACL of file(s), replacing the current ACL --set-file=file read ACL entries to set from file --mask do recalculate the effective rights mask -n, --no-mask don't recalculate the effective rights mask -d, --default operations apply to the default ACL -R, --recursive recurse into subdirectories -L, --logical logical walk, follow symbolic links -P, --physical physical walk, do not follow symbolic links --restore=file restore ACLs (inverse of `getfacl -R') --test test mode (ACLs are not modified) --version print version and exit --help this help text
|
Getfacl-----查看
getfacl 2.2.23 -- get file access control lists
Usage: getfacl [-dRLP] file ... --access display the file access control list only -d, --default display the default access control list only --omit-header do not display the comment header --all-effective print all effective rights --no-effective print no effective rights --skip-base skip files that only have the base entries -R, --recursive recurse into subdirectories -L, --logical logical walk, follow symbolic links -P --physical physical walk, do not follow symbolic links --tabular use tabular output format --numeric print numeric user/group identifiers --absolute-names don't strip leading '/' in pathnames --version print version and exit --help this help text
|
Done. 本文出自 “影龙之子” 博客,谢绝转载! 本文出自 51CTO.COM技术博客 |