{"id":343,"date":"2010-07-07T23:34:43","date_gmt":"2010-07-08T05:34:43","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=343"},"modified":"2018-10-04T06:40:37","modified_gmt":"2018-10-04T12:40:37","slug":"access-control-list","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/access-control-list\/","title":{"rendered":"Access Control List"},"content":{"rendered":"<p>An <b>access control list<\/b> (<b>ACL)<\/b> is a list of permissions attached to a file\/folder. ACL specifies which users or system processes are granted access to files\/folders.<\/p>\n<p>Setfacl It is a command that allows you to set the ACL information for a file or directory. They are used to allow permissions to be set for individual groups and users and not just the owning user, owning group, and all other users<\/p>\n<p>$ setfacl -m u:&lt;username&gt;:r &lt;filename&gt;<\/p>\n<p>u- user<\/p>\n<p>r- read<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>The above command grants a user additional read access to a file.<\/p>\n<p>Example<\/p>\n<p># touch test<\/p>\n<p># ls -sl test<\/p>\n<p>0 -rw-r&#8211;r&#8211; 1 root root 0 Jul 7 18:52 test<\/p>\n<p>setfacl -m u:testuser:r test<\/p>\n<p># ls -ls test<\/p>\n<p>4 -rw-r&#8211;r&#8211;+ 1 root root 0 Jul 7 18:52 test<\/p>\n<p><b>The little &#8220;+&#8221; at the end of access rights column indicates that the file has ACL set.<\/b><\/p>\n<p>$ setfacl -m m::rx &lt;filename&gt;<\/p>\n<p>The above command revokes write access from all groups and all named users.<\/p>\n<p>$ setfacl -x g:staff &lt;filename&gt;<\/p>\n<p>The above command removes a named group entry from a files ACL.<\/p>\n<p>setfacl -b &lt;filename&gt;<\/p>\n<p>The above command deletes ACL set for the file.<\/p>\n<p>Getfacl<\/p>\n<p>The getfacl utility displays the owner, the group, and the Access Control List (ACL). For each directory argument, getfacl displays the owner, the group, and the ACL and\/or the default ACL. Only directories contain default ACLs.<\/p>\n<p>With no options specified, getfacl displays the filename, the file owner, the file group owner, and both the ACL and the default ACL, if it exists.<\/p>\n<p>getfacl &lt;filename&gt;<\/p>\n<p>example<\/p>\n<p>getfacl test<\/p>\n<p># getfacl test<\/p>\n<p># file: test<\/p>\n<p># owner: root<\/p>\n<p># group: root<\/p>\n<p>user::rw-<\/p>\n<p>user:test:rw-<\/p>\n<p>group::r&#8211;<\/p>\n<p>mask::rw-<\/p>\n<p>other::r&#8211;<\/p>\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An access control list (ACL) is a list of permissions attached to a file\/folder. ACL specifies which users or system processes are granted access to files\/folders. Setfacl It is a&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-343","post","type-post","status-publish","format-standard","hentry","category-miscellaneous"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=343"}],"version-history":[{"count":1,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions"}],"predecessor-version":[{"id":3396,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/343\/revisions\/3396"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}