ACL: Difference between revisions

From Leo's Notes
This page was last edited on 13 June 2017, at 17:45.
m Text replacement - "</code>" to "}}"
Line 16: Line 16:


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



Revision as of 17:45, 13 June 2017

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}} flag. 
setfacl -R -m user:leo:wrx /home/leo

To remove ACL permissions for a user:

setfacl -x user:leo /home/leo

To clone ACL permissions from fileA to fileB:

getfacl fileA | setfacl -bnM - fileB