Understanding Unix File Permissions
Permission Notation Systems
There are two ways to represent Unix permissions:
- Symbolic notation
- Numeric notation
Symbolic Notation
Consists of three sets of symbols called permission class
.
Permission Classes
- First set represents User/Owner class
- Second set represents Group class
- Third set represents Others/everyone else class
Permission Types
Each set consists of 3 symbols each represents a permission:
- “r” for read permission
- “w” stands for write permission
- “x” show execution permission
Numeric Notation
Consists of 3 sets of octal numbers to represent each permission component; owner, group, and others e.g. 777 or 745. Each octal number is the sum of its component bits in binary. Therefore;
Permission Values
- 1 –> execution permission
- 2 –> write permission
- 4 –> read permission
For example:
- 7 is 4 + 2 + 1 which means read & write & execution permissions
- 6 is 4 + 2 which means read & write permission
- 5 is 4 + 1 which means read & execution permission