Green YGreck Guides FR
🐧 LinuxIntermediate⏱ 10 min5 steps

Understand permissions (chmod, chown)

Read a "-rwxr-xr-x" and fix access denied errors.

  1. See the permissions:
    ls -l
  2. Three blocks: owner, group, others. r = 4, w = 2, x = 1. So 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--.
  3. File readable by all, editable by you / executable script:
    chmod 644 fichier.txt
    chmod +x script.sh
  4. Change the owner:
    sudo chown utilisateur:groupe fichier
  5. Avoid chmod 777: it gives everyone full rights.