← Cheat Sheets
Linux File Permissions (chmod)
Read the numbers and symbols of permissions.
# Linux File Permissions (chmod)
Read the numbers and symbols of permissions.
| Bit | Value |
|---|---|
| r (read) | 4 |
| w (write) | 2 |
| x (execute) | 1 |
| Mode | Symbolic | Typical use |
|---|---|---|
| 755 | rwxr-xr-x | Scripts and folders |
| 644 | rw-r--r-- | Normal files |
| 600 | rw------- | Private keys, secrets |
| 700 | rwx------ | Private folders |
| 777 | rwxrwxrwx | Avoid: anyone can modify |
```bash
chmod +x script.sh # make executable
chmod 600 ~/.ssh/id_ed25519
chmod -R 755 folder
chown user:group file
umask 022 # default: files 644, folders 755
```
Order is **user, group, others**. In `ls -l`, a leading `d` means directory.