Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chmod is an abbreviation of change mode. There are two ways to chmod:
- Symbolic (e.g. chmod +x)
- Code:
- chmod <people><+/-><permissions>
- Example: chmod
- o-w (deny others from editing the file)
- Example: chmod
- u+rwx (give the owner full control)
- Exmaple: chmod
- +rwx (give everyone full control)
- Example: chmod
- +x (allow anyone to execute the file)
- Code:
- Key:
- r - Read
- w - Write
- x - Execute
- u - The owner of the file
- g - The group that the file belongs to
- o - Anybody who is not one of the above
- a - All users
- + - Add permissions
- - - Remove
- permissions
- Numerical (e.g. chmod 700):
- Code:
- : The first octet represents permissions for the owner.
- r w x T : The second octet represents permissions for the group.
- Owner: 4 2 1 7 : The third octet represents permissions for everyone else.
- Group: 0 0 0 0 : For each octet, start at 0 and:
- Other: 0 0 0 0 : +4 for read permission.
- : +2 for write permission.
- Command: chmod
- 700 : +1 for execute permission.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement