Posted By

kayue on 11/13/10


Tagged


Versions (?)

File ACL Operations


 / Published in: Bash
 

  1. # Enable ACL
  2. mount -o remount,acl /
  3.  
  4. # Set defualt ACL
  5. setfacl -m d:g:theGroup:rwx .
  6.  
  7. # Get ACL
  8. getfacl <file>
  9.  
  10. # Set ACL to user (--modify)
  11. setfacl -m u:<user>:rwx public_html
  12.  
  13. # Set ACL to group (--modify)
  14. setfacl -m g:<group>:rwx public_html
  15.  
  16. # Set ACL recursively (--modify)
  17. setfacl -Rm g:<group>:rwx .
  18.  
  19. # Remove specific ACL entries (--remove)
  20. setfacl -x u:<user> <file>
  21.  
  22. # Remove entire ACL
  23. setfacl --remove-all <file>
  24.  
  25. # Remove entire ACL setting recursively
  26. setfacl -Rb .
  27.  

Report this snippet  

You need to login to post a comment.