ACL

From Leo's Notes
Revision as of 06:20, 1 September 2019 by Leo (talk | contribs) (Text replacement - "Category:Linux{{Navbox Linux}}" to "{{Navbox Linux}}Category:Linux")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 1 September 2019, at 06:20.

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 -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