{"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_memberships_contains_paid_content":false,"footnotes":""},"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":23300,"url":"http:\/\/bangla.sitestree.com\/?p=23300","url_meta":{"origin":78682,"position":2},"title":"#laravel laracast intermediate Component Exercise #1 Rendering and Working With Lists A Peek into Components ACL in Laravel: Part 3 (Behind the Scenes)","author":"Author-Check- Article-or-Video","date":"March 28, 2021","format":false,"excerpt":"Component Exercise #1Learning Vue 1.0: Step By Step - Episode #12 JAVASCRIPT \u2022 NOV 30TH, 2015 \u2022 INTERMEDIATE \u2022 8:27 ADD TO WATCHLIST Vue ResourceLearning Vue 1.0: Step By Step - Episode #11 JAVASCRIPT \u2022 NOV 25TH, 2015 \u2022 INTERMEDIATE \u2022 6:22 ADD TO WATCHLIST Vue, Laravel, and AJAXLearning Vue\u2026","rel":"","context":"In &quot;Laravel&quot;","block_context":{"text":"Laravel","link":"http:\/\/bangla.sitestree.com\/?cat=1852"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76465,"url":"http:\/\/bangla.sitestree.com\/?p=76465","url_meta":{"origin":78682,"position":3},"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":78673,"url":"http:\/\/bangla.sitestree.com\/?p=78673","url_meta":{"origin":78682,"position":4},"title":"Explain: Get-Children and Rename-Item","author":"Sayed","date":"May 24, 2026","format":false,"excerpt":"Below, parent command means the main cmdlet being used: Get-ChildItem or Rename-Item. 1. Get-ChildItem -Path C:\\Users\\sayed\\* -Include *.txt Parent command: Get-ChildItem Get-ChildItem lists files and folders in a location. It is similar to: dir ls gci Your rename-files lab explains that Get-ChildItem returns items from one or more locations and\u2026","rel":"","context":"In &quot;Power Shell&quot;","block_context":{"text":"Power Shell","link":"http:\/\/bangla.sitestree.com\/?cat=1981"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":24388,"url":"http:\/\/bangla.sitestree.com\/?p=24388","url_meta":{"origin":78682,"position":5},"title":"#laravel Fetching Data How to Write Custom Blade Directives Routing to Controllers API Rate Limiting Preparing the Flyer Page How to Manage Your CSS and JS API Rate Limiting Guards and Authorization","author":"Sayed","date":"April 8, 2021","format":false,"excerpt":"Fetching DataLaravel 5.2 From Scratch - Episode #7 LARAVEL \u2022 FEB 3RD, 2016 \u2022 BEGINNER \u2022 21:31 ADD TO WATCHLIST How to Write Custom Blade DirectivesIntermediate Laravel - Episode #12 LARAVEL \u2022 FEB 3RD, 2016 \u2022 INTERMEDIATE \u2022 8:22 ADD TO WATCHLIST How to Manage Your CSS and JSLaravel 5.2\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"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}]}}