{"id":6888,"date":"2020-04-19T21:47:10","date_gmt":"2020-04-19T13:47:10","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6888"},"modified":"2022-05-24T16:00:31","modified_gmt":"2022-05-24T08:00:31","slug":"getfacl","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/getfacl","title":{"rendered":"getfacl\u547d\u4ee4 – \u663e\u793a\u6587\u4ef6\u6216\u76ee\u5f55\u7684ACL\u7b56\u7565"},"content":{"rendered":"\n
getfacl\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dget file access control list\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u663e\u793a\u6587\u4ef6\u6216\u76ee\u5f55\u7684ACL\u7b56\u7565\u3002\u5bf9\u6307\u5b9a\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u8fdb\u884c\u7cbe\u51c6\u7684\u6743\u9650\u63a7\u5236\uff0cFACL\u4e00\u5b9a\u662f\u4e0d\u4e8c\u4e4b\u9009\uff0c\u5feb\u7528getfacl\u547d\u4ee4\u67e5\u770b\u4e0b\u5df2\u6709\u90a3\u4e9b\u6743\u9650\u5427\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>getfacl [\u53c2\u6570] \u6587\u4ef6\u6216\u76ee\u5f55<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u4e0a\u6709\u90a3\u4e9b\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\uff1a<\/p>\n\n\n\n \u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u4e0a\u6709\u90a3\u4e9b\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\uff0c\u4e0d\u663e\u793a\u6ce8\u91ca\u4fe1\u606f\uff1a<\/p>\n\n\n\n \u4f7f\u7528\u8868\u683c\u5f62\u5f0f\u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u4e0a\u6709\u90a3\u4e9b\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\uff1a<\/p>\n\n\n\n getfacl\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dget file access control list\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6888"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6888"}],"version-history":[{"count":9,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6888\/revisions"}],"predecessor-version":[{"id":9999,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6888\/revisions\/9999"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-a<\/td> \u663e\u793a\u6587\u4ef6\u7684ACL<\/td><\/tr> -d<\/td> \u663e\u793a\u9ed8\u8ba4\u7684ACL<\/td><\/tr> -c<\/td> \u4e0d\u663e\u793a\u6ce8\u91ca\u6807\u9898<\/td><\/tr> -e<\/td> \u663e\u793a\u6240\u6709\u7684\u6709\u6548\u6743\u9650<\/td><\/tr> -E<\/td> \u663e\u793a\u6ca1\u6709\u7684\u6709\u6548\u6743\u9650<\/td><\/tr> -s<\/td> \u8df3\u8fc7\u6587\u4ef6\uff0c\u53ea\u5177\u6709\u57fa\u672c\u6761\u76ee<\/td><\/tr> -R<\/td> \u9012\u5f52\u5230\u5b50\u76ee\u5f55<\/td><\/tr> -t<\/td> \u4f7f\u7528\u8868\u683c\u8f93\u51fa\u683c\u5f0f<\/td><\/tr> -n<\/td> \u663e\u793a\u7528\u6237\u7684UID\u548c\u7ec4\u7fa4\u7684GID<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# getfacl linuxcool.txt<\/strong>\n# file: test\n# owner: root\n# group: root\nuser::rw-\ngroup::r--\nother::r--<\/pre>\n\n\n\n
[root@linuxcool ~]# getfacl -c linuxcool.txt<\/strong>\nuser::rw-\ngroup::r--\nother::r--<\/pre>\n\n\n\n
[root@linuxcool ~]# getfacl -t linuxcool.txt<\/strong>\nfile: linuxcool.txt\nUSER root rw-\nGROUP root r--\nother r--<\/pre>\n","protected":false},"excerpt":{"rendered":"