darrenldl

setfacl_file_list

Dec 6th, 2013
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. # NO will change the action, '-m' to '-x'
  2. # ALL implies all users/groups
  3. # RESTRICT USER/GROUP and EXCLUDE USER/GROUP can be used once within one ACL block
  4. # One ACL block = NO/RESTRICT...END
  5. # In other words,ACL blocks must start with NO or RESTRICT and ends with END
  6. # RESTRICT,PERM and END must be present, NO and EXCLUDE are optional.
  7. # PERM specifies the default permission for a single segment
  8. # However, you can also specify it individually, like shown below (line 16)
  9. # The script will ignore comments, empty lines or lines filled with spaces
  10.  
  11. RESTRICT USER ALL   # The script will ignore inline comments as well, like this one
  12. RESTRICT GROUP group2
  13. EXCLUDE USER user1
  14. PERM rwx
  15.  
  16. file1 ---       # At here, --- replaces rwx, so file1 has permission of ---
  17. file2
  18.  
  19. END
  20.  
  21. NO          # Since this ACL block starts with NO, the generated operation
  22. RESTRICT USER user2 # will be "setfacl -x ..." instead of "setfacl -m ..."
  23. RESTRICT GROUP group1
  24. PERM 5          # You can also use number instead of string to specify permission
  25.  
  26. file3
  27. END
Advertisement
Add Comment
Please, Sign In to add comment