ACL: Difference between revisions
From Leo's Notes
This page was last edited on 30 April 2015, at 18:49.
No edit summary |
No edit summary |
||
| Line 23: | Line 23: | ||
setfacl -x user:leo /home/leo | setfacl -x user:leo /home/leo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
To clone ACL permissions from fileA to fileB: | |||
<syntaxhighlight lang="bash" line start="1" enclose="div"> | |||
getfacl fileA | setfacl -bnM - fileB | |||
</syntaxhighlight> | |||
[[Category:Linux]] | [[Category:Linux]] | ||
Revision as of 18:49, 30 April 2015
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
To clone ACL permissions from fileA to fileB:
getfacl fileA | setfacl -bnM - fileB