Advertisement
kremisoski

chmod

Mar 14th, 2015
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. chmod is an abbreviation of change mode. There are two ways to chmod:
  2.  
  3. Symbolic (e.g. chmod +x)
  4. Code:
  5. chmod <people><+/-><permissions>
  6. Example: chmod
  7. o-w (deny others from editing the file)
  8. Example: chmod
  9. u+rwx (give the owner full control)
  10. Exmaple: chmod
  11. +rwx (give everyone full control)
  12. Example: chmod
  13. +x (allow anyone to execute the file)
  14. Code:
  15. Key:
  16. r - Read
  17. w - Write
  18. x - Execute
  19.  
  20. u - The owner of the file
  21. g - The group that the file belongs to
  22. o - Anybody who is not one of the above
  23. a - All users
  24.  
  25. + - Add permissions
  26. - - Remove
  27. permissions
  28.  
  29. Numerical (e.g. chmod 700):
  30. Code:
  31.                     : The first octet represents permissions for the owner.
  32.        r w x  T     : The second octet represents permissions for the group.
  33. Owner:  4 2 1  7    : The third octet represents permissions for everyone else.
  34. Group:  0 0 0  0    : For each octet, start at 0 and:
  35. Other:  0 0 0  0    : +4 for read permission.
  36.             : +2 for write permission.
  37.  
  38. Command: chmod
  39. 700         : +1 for execute permission.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement