Understand permissions (chmod, chown)
Read a "-rwxr-xr-x" and fix access denied errors.
- See the permissions:
ls -l
- Three blocks: owner, group, others. r = 4, w = 2, x = 1. So 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--.
- File readable by all, editable by you / executable script:
chmod 644 fichier.txt chmod +x script.sh
- Change the owner:
sudo chown utilisateur:groupe fichier
- Avoid chmod 777: it gives everyone full rights.