← Linux Administration learning pathLinux Administration · Module 3 of 10
File permissions and ownership
Control access to files and folders.
📖 Key ideas
- Permissions: read (r=4), write (w=2), execute (x=1) for owner, group, others.
- chmod 640 file sets owner rw, group r, others none.
- chown user:group file changes ownership.
- Directories need x to be entered.
- 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