← Linux Administration learning path
Linux Administration · Module 3 of 10

File permissions and ownership

Control access to files and folders.

📖 Key ideas

  1. Permissions: read (r=4), write (w=2), execute (x=1) for owner, group, others.
  2. chmod 640 file sets owner rw, group r, others none.
  3. chown user:group file changes ownership.
  4. Directories need x to be entered.
  5. Special bits: setuid, setgid, sticky bit (/tmp).
💡 Real-life example: Permissions are three locks on a door: one for the owner, one for the family, one for strangers.
chmodChanges permissions
chownChanges ownership
Octal modeNumbers like 755
Sticky bitOnly owners can delete their files in shared folders