chmod - change mode
chmod mode file1 [ file2 ...]
Changes the permissions of each named
, which may be absolute or symbolic. An absolute
is an octal number constructed from the OR of the following modes:
A symbolic mode has the form:
op permission [op permission]
to the file's mode, - to take away
absolutely (all other bits are reset).
is any combination of the letters
is only useful with
to take away all permissions.
The first example denies write permission, the second makes a file
executable, the third assigns read only permission, and the fourth
assigns read, write, and execute permissions.
chmod -w file
chmod +x file
chmod = r file
chmod 7 file