Chmod

By | 2011/07/25

Legend:
u – users
g – groups
o – others
a – all

To add a write permissions for the user (+ because we want to add them):

chmod u+w file

To remove a read/write permissions for the group (- because we want to remove them):

chmod g-rw file

Specifying multiple permissions per once:

chmod u=rwx, go=r file

Specifying permissions for all groups:

chmod a+r file

Setting permissions recursively:

chmod -R o-rwx some/directory