Linux Permissions
Read ls output, chmod, chown, and sudo without breaking access.
- chmod
- chown
- linux permissions
- sudo
- ssh key permission
Linux Permissions
Read ls output, chmod, chown, and sudo without breaking access.
Commands
| Command | What it does |
|---|---|
ls -l | Decode rwxr-xr-x at a glance |
chmod 755 script.sh | Standard for scripts |
chmod -R 640 config/ | Readable, not executable |
chown -R app:app /srv/app | Fix ownership after root copies |
sudo !! | Re-run last command as root |
Example
chmod 600 ~/.ssh/id_ed25519
chown -R app:app /srv/app
FAQ
What do 755 and 644 mean?
Octal triples for owner, group, other: 7 is rwx, 6 is rw, 5 is r-x, 4 is r. Scripts 755, data 644, keys 600.
Permission denied but the file looks fine?
Check parent directory execute bits and ownership - traversal needs execute on every ancestor.
FAQ
What do 755 and 644 mean?
Octal triples for owner, group, other: 7 is rwx, 6 is rw, 5 is r-x, 4 is r. Scripts 755, data 644, keys 600.
Permission denied but the file looks fine?
Check parent directory execute bits and ownership - traversal needs execute on every ancestor.
Linux
Linux Files and Directories
Navigate, create, move, and inspect files with core commands.
Linux Text Processing
cat, head, cut, sort, uniq, and awk for daily data shaping.
Linux grep and find
Find files by name, age, and size; search inside them fast.
Linux Processes
See what runs, what eats CPU, and how to stop it cleanly.