The Permissions Matrix
When you use ls -l, the first column displays a 10-character string that defines the file type and permissions.
bash -rw-r--r--
Character Breakdown
| Position | Meaning | Options |
|---|---|---|
| 1st | File Type | - (regular file), d (directory), l (link) |
| 2nd - 4th | User (Owner) Permissions | rwx (read, write, execute) |
| 5th - 7th | Group Permissions | rwx (read, write, execute) |
| 8th - 10th | Others (World) Permissions | rwx (read, write, execute) |
Permissions Explained
- r (Read): Allows viewing file contents (files) or listing directory contents (directories).
- w (Write): Allows modifying file contents (files) or creating/deleting files within the directory (directories).
- x (Execute): Allows running a file as a program (files) or entering/traversing the directory (directories).