ACL: Difference between revisions

From Leo's Notes
This page was last edited on 29 April 2013, at 18:32.
Created page with "== Linux == To get ACL permissions getfacl To set ACL permissions for a user: setfacl -m user:<user>:<perms> <path> eg: setfacl -m user:leo:wrx /home/leo To do this re..."
 
No edit summary
Line 2: Line 2:


To get ACL permissions
To get ACL permissions
getfacl
 
<syntaxhighlight lang="bash" line start="1" enclose="div">
getfacl
</syntaxhighlight>




To set ACL permissions for a user:
To set ACL permissions for a user:
setfacl -m user:<user>:<perms> <path>
<syntaxhighlight lang="bash" line start="1" enclose="div">
setfacl -m user:<user>:<perms> <path>


eg:
# eg:
setfacl -m user:leo:wrx /home/leo
setfacl -m user:leo:wrx /home/leo


To do this recursively, pass the <code>-R</code> flag.  
# To do this recursively, pass the <code>-R</code> flag.  
setfacl -mR user:leo:wrx /home/leo
</syntaxhighlight>


To remove ACL permissions for a user:
To remove ACL permissions for a user:
setfacl -x user:leo /home/leo
<syntaxhighlight lang="bash" line start="1" enclose="div">
setfacl -x user:leo /home/leo
</syntaxhighlight>


[[Category:Linux]]
[[Category:Linux]]

Revision as of 18:32, 29 April 2013

Linux

To get ACL permissions

getfacl


To set ACL permissions for a user:

setfacl -m user:<user>:<perms> <path>

# eg:
setfacl -m user:leo:wrx /home/leo

# To do this recursively, pass the <code>-R</code> flag. 
setfacl -mR user:leo:wrx /home/leo

To remove ACL permissions for a user:

setfacl -x user:leo /home/leo