{"id":806,"date":"2024-01-25T16:46:20","date_gmt":"2024-01-25T15:46:20","guid":{"rendered":"https:\/\/www.homeserver.lu\/?p=806"},"modified":"2024-01-30T12:49:58","modified_gmt":"2024-01-30T11:49:58","slug":"using-acl-permissions-in-ubuntu","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=806","title":{"rendered":"Using ACL permissions in Ubuntu"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">List ACL&#8217;s for a given directory<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>getfacl \/var\/www<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code># file: www\n# owner: root\n# group: root\nuser::rwx\ngroup::r-x\nother::r-x<\/code><\/pre>\n\n\n\n<p>You might need to install ACL (<em>apt install acl<\/em>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add a group to an ACL<\/h2>\n\n\n\n<p>Use <em>setfacl<\/em> to add a group to the ACL<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>setfacl -m g:family:rwx \/var\/www\/<\/code><\/pre><\/div>\n\n\n\n<p>This leads your check on ACL like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> # file: www\n # owner: root\n # group: root\n user::rwx\n group::r-x\n group:family:rwx\n mask::rwx\n other::r-x<\/code><\/pre>\n\n\n\n<p>Removing an ACL entry:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>setfacl -x g:family \/var\/www<\/code><\/pre><\/div>\n\n\n\n<p>Granting an additional user read-write access<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>setfacl -m u:jhemp:rw \/var\/www<\/code><\/pre><\/div>\n\n\n\n<p>More information: <a href=\"https:\/\/help.ubuntu.com\/community\/FilePermissionsACLs\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/help.ubuntu.com\/community\/FilePermissionsACLs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>List ACL&#8217;s for a given directory You might need to install ACL (apt install acl). Add a group to an ACL Use setfacl to add a group to the ACL This leads your check on ACL like this: Removing an ACL entry: Granting an additional user read-write access More information: https:\/\/help.ubuntu.com\/community\/FilePermissionsACLs<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-806","post","type-post","status-publish","format-standard","hentry","category-cli"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/806","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=806"}],"version-history":[{"count":6,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions"}],"predecessor-version":[{"id":861,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/806\/revisions\/861"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=806"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=806"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}