Usage:
chmod [options] <octal-mode> <file>
octal-mode should be bitwise OR of the following octal values:
| octal value | access | description |
|---|---|---|
| 4000 | setuid bit | run the program file as the user ID of the file's owner |
| 2000 | setgid bit | run the program file as the group ID of the file's group |
| 400 | owner read access | |
| 200 | owner write access | |
| 100 | owner execute access | |
| 40 | group read access | |
| 20 | group write access | |
| 10 | group execute access | |
| 4 | others read access | |
| 2 | others write access | |
| 1 | others execute access |
sxx
sudo chmod 755 /bin/cp.x
755: allow owner to read, write and execute, group to read and execute and others to read and execute.
| long option | short option | description |
|---|---|---|
| ‑‑help | ‑h | Print help and exit. |