« Back to Index

chmod and chown explained

View original Gist on GitHub

chmod explained.md

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

Syntax Structure:

chmod <people><+/-><permissions>

Examples:

Numericals:

chmod 755

Each number represents a different authorisation point…

Each item is the total of the following numbers…

So 755 means…

chown explained.sh

chown <user>:<group> <file>