File and Directory Attributes:
Unix/Linux files have 8 attributes that can be seen with ls –ld
[root@comp1 ~]# ls -ld reports
Access Levels:
Access Mode:
Access Modes:
Absolute Mode | Symbolic Mode | File | Directory |
4 | r | To displays the contents of the file | To list the contents of the directory |
2 | w | To modify or append to the file | To create or remove file and directories |
1 | x | To execute the file | To enter into the directory |
Default Permissions:
Files | Directory | |||
Created by Root | rw_r_ _r_ _ | 644 | rwxr_xr_x | 755 |
Created by User | rw_rw_r_ _ | 664 | rwxrwxr_x | 775 |
Modifying the Permissions:
[root@comp1 ~]# chmod <permissions/weight> <file/directory>
Options:
Category | u (owner) | g (group) | o (others) |
Operators | + | – | = |
Permissions | r | w | x |
Permissions | 4 | 2 | 1 |
Example of Permission – Absolute
Applying permission to Owner (u), Group (g) and Others (o) on the file reports
Example of Permission – Symbolic:
Applying permission to Owner (u), Group (g) and Others (o) on the file reports