{"id":78682,"date":"2026-05-30T23:25:02","date_gmt":"2026-05-30T23:25:02","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=78682"},"modified":"2026-05-30T23:25:04","modified_gmt":"2026-05-30T23:25:04","slug":"linux-setfacl-remove-a-user-completely","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=78682","title":{"rendered":"Linux: setfacl remove a user completely"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To <strong>remove a specific user completely from ACL permissions<\/strong>, use <code>setfacl -x<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Remove a user ACL from a file<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:username filename\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:john report.txt\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>getfacl report.txt\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Remove a user ACL from a directory<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:username directoryname\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:john projectdir\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">If the directory has default ACLs too<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For directories, a user may have:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Access ACL<\/strong> \u2014 applies to the directory itself<\/li>\n\n\n\n<li><strong>Default ACL<\/strong> \u2014 automatically inherited by new files\/subdirectories created inside<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Remove both:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:john projectdir\nsetfacl -x d:u:john projectdir\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Or in one command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -x u:john,d:u:john projectdir\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Remove user ACL recursively<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To remove that user from a directory and everything inside it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -R -x u:john projectdir\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To remove both access ACL and default ACL recursively:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -R -x u:john,d:u:john projectdir\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Important note<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This removes the user from the <strong>ACL<\/strong>, but it does <strong>not<\/strong> delete the Linux user account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, if that user is the <strong>owner<\/strong> of the file, removing ACL will not remove owner permissions. You would need <code>chown<\/code> or <code>chmod<\/code> for that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chown otheruser report.txt\nchmod 640 report.txt\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Remove all ACL entries from a file<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To remove <strong>all extended ACLs<\/strong>, not just one user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -b filename\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>setfacl -b report.txt\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Use this carefully because it removes all extra ACL users\/groups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">REF: AI Tools\/ChatGPT<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To remove a specific user completely from ACL permissions, use setfacl -x. Remove a user ACL from a file Example: Check: Remove a user ACL from a directory Example: If the directory has default ACLs too For directories, a user may have: Remove both: Or in one command: Remove user ACL recursively To remove that &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=78682\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1976],"tags":[],"class_list":["post-78682","post","type-post","status-publish","format-standard","hentry","category-anything-linux","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":78680,"url":"http:\/\/bangla.sitestree.com\/?p=78680","url_meta":{"origin":78682,"position":0},"title":"Linux: Regular Permissions (symbolic\/numeric) vs ACL","author":"Sayed","date":"May 30, 2026","format":false,"excerpt":"Linux has two main permission layers: 1. Traditional permissions: user \/ group \/ others (UGO) 2. ACL permissions: extra permission rules for specific users\/groups 1. Traditional UGO permissions UGO means: u = user owner g = group owner o = others Example: chmod ugo+x script.sh means: Give execute permission to\u2026","rel":"","context":"In &quot;Anything Linux&quot;","block_context":{"text":"Anything Linux","link":"http:\/\/bangla.sitestree.com\/?cat=1976"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78678,"url":"http:\/\/bangla.sitestree.com\/?p=78678","url_meta":{"origin":78682,"position":1},"title":"Linux: ACL vs Selinux","author":"Sayed","date":"May 30, 2026","format":false,"excerpt":"ACL vs SELinux ACL and SELinux both control access, but they work at different levels. FeatureACLSELinuxFull nameAccess Control ListSecurity-Enhanced LinuxMain purposeGive extra file permissions to specific users\/groupsEnforce system-wide security policyAccess modelDAC: Discretionary Access ControlMAC: Mandatory Access ControlControlled byFile owner\/rootSELinux policy\/rootWorks onFiles\/directoriesFiles, processes, ports, services, usersCommon commandsgetfacl, setfaclgetenforce, ls -Z, semanage,\u2026","rel":"","context":"In &quot;Anything Linux&quot;","block_context":{"text":"Anything Linux","link":"http:\/\/bangla.sitestree.com\/?cat=1976"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76465,"url":"http:\/\/bangla.sitestree.com\/?p=76465","url_meta":{"origin":78682,"position":2},"title":"Linux ps command","author":"Sayed","date":"December 8, 2024","format":false,"excerpt":"ps x ps -e ps aux ps \u2013u username","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78688,"url":"http:\/\/bangla.sitestree.com\/?p=78688","url_meta":{"origin":78682,"position":3},"title":"Special Permissions: SUID, SGID, sticky bit","author":"Sayed","date":"May 31, 2026","format":false,"excerpt":"Linux Special Permissions: SUID, SGID, and Sticky Bit Linux normally uses three permission groups: u = user\/owner g = group o = others And three basic permissions: r = read w = write x = execute Example: ls -l file.txt Output: -rwxr-xr-- But Linux also has special permissions: SUID =\u2026","rel":"","context":"In &quot;Anything Linux&quot;","block_context":{"text":"Anything Linux","link":"http:\/\/bangla.sitestree.com\/?cat=1976"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20401,"url":"http:\/\/bangla.sitestree.com\/?p=20401","url_meta":{"origin":78682,"position":4},"title":"Learn some Centos\/Redhat Linux: RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS","author":"Author-Check- Article-or-Video","date":"February 20, 2021","format":false,"excerpt":"RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS Check if mariaDB is installed or not 130 yum list installed | grep ^mariadb mariaDB originated from MySQL - after MySQL Got Bought by Oracle 133 yum list installed | grep ^mariadb I see - installed though not completely Output: mariadb-libs.x86_64 1:5.5.52-1.el7 @anaconda There are\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20403,"url":"http:\/\/bangla.sitestree.com\/?p=20403","url_meta":{"origin":78682,"position":5},"title":"Learn some Centos\/Redhat Linux: RHCE: MariaDB Administration on Redhat\/Fedora\/CentOS","author":"Author-Check- Article-or-Video","date":"February 20, 2021","format":false,"excerpt":"The author is: the_authornRHCE: MariaDB Administration on Redhat\/Fedora\/CentOS Check if mariaDB is installed or not 130 yum list installed | grep ^mariadb mariaDB originated from MySQL - after MySQL Got Bought by Oracle 133 yum list installed | grep ^mariadb I see - installed though not completely Output: mariadb-libs.x86_64 1:5.5.52-1.el7\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78682","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78682"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78682\/revisions"}],"predecessor-version":[{"id":78683,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/78682\/revisions\/78683"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78682"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78682"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78682"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}