chmod mode file... chmod [augo][+-=][rwx] file...
A mode can be numerically constructed from the INCLUSIVE OR of the following VALUES:
0400 | read by owner |
0200 | write by owner |
0100 | execute (search in directory) by owner |
0070 | read, write, execute (search) by group |
0007 | read, write, execute (search) by others |
[who] op permissionThe who part is a combination of the letters u (for user's permissions), g (group) and o (other). The letter a stands for ugo. If who is omitted, the default is a.
+ | to add permission to the file's mode |
- | to take away permission |
= |
to assign permission absolutely (all other bits will be reset) |
The permission field is any combination of the letters r (read), w (write), and x (execute).