Guest User

Untitled

a guest
Oct 17th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. $ tune2fs -l /dev/sda6 | grep "Default mount options:"
  2. Default mount options: user_xattr acl
  3.  
  4. $ setfacl -m "u:username:rwx" /path/to/folder
  5.  
  6. $ setfacl -m "g:groupname:rwx" /path/to/folder
  7.  
  8. $ setfacl -m "o:rwx" /path/to/folder
  9.  
  10. $ getfacl /path/to/folder
  11.  
  12. $ setfacl -m u:username:rwx,g:groupname:rwx,o:rwx /path/to/folder
  13.  
  14. The new object inherits the default ACL of the containing directory as its
  15. access ACL.
  16.  
  17. If no default ACL is associated with a directory, the mode parameter to the func‐
  18. tions creating file objects and the file creation mask (see umask(2)) are used to
  19. determine the ACL of the new object:
  20.  
  21. The new object is assigned an access ACL containing entries of tag types
  22. ACL_USER_OBJ, ACL_GROUP_OBJ, and ACL_OTHER. The permissions of these entries
  23. are set to the permissions specified by the file creation mask.
  24.  
  25. $ setfacl -d -m u::rwx,g::rwx,o::rwx /path/to/folder
  26.  
  27. $ setfacl -m default:u::rwx,default:g::rwx,default:o::rwx /path/to/folder
  28.  
  29. $ setfacl -d -m o:--x /path/to/folder
  30.  
  31. $ getfacl /path/to/folder
  32. # file: path/to/folder
  33. # owner: c0rp
  34. # group: c0rp
  35. user::rwx
  36. group::rwx
  37. other::--x
  38. default:user::rwx
  39. default:group::rwx
  40. default:other::--x
  41.  
  42. $ setfacl -b /path/to/folder
  43.  
  44. $ setfacl -d -m u::rwx,g::rwx,o::rwx /path/to/folder
Add Comment
Please, Sign In to add comment