Guest User

Untitled

a guest
Jan 17th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. ### List
  2. ```sh
  3. ls -le
  4. ```
  5.  
  6. ### Add
  7. ```sh
  8. # Recursively add the following ACE to all files and folders inside Directory Name, marking the ACE as inherited.
  9. chmod -R +ai "group:marketing allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" DirectoryName/*
  10.  
  11. # Apply the same ACE directly to "Directory Name," without marking it as inherited (allowing it to be edited in the Server app).
  12. chmod +a "group:marketing allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" DirectoryName
  13. ```
  14.  
  15. ### Insert by index +a#
  16. ```sh
  17. chmod +a# 0 "group:marketing allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" DirectoryName
  18. ```
  19.  
  20. ### Replace =a#
  21. ```sh
  22. chmod =a# 2 "group:marketing allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" DirectoryName
  23. ```
  24.  
  25. ### Remove -a#
  26. ```sh
  27. chmod -a# 0 DirectoryName
  28.  
  29. # Use -N to alltogether remove an ACL from a file or directory:
  30. # Tip: chmod -RN will recursively remove ACLs
  31. chmod -N DirectoryName
  32. ```
Add Comment
Please, Sign In to add comment