Permissions & Users
The problem
A shared or networked machine needs to prevent one user's programs from reading or corrupting another user's files, and to restrict which programs can perform sensitive operations — permissions and users are the enforcement mechanism for that isolation at the filesystem level.
Why now
Processes and threads already established that each process runs under some identity with certain privileges; this topic makes that identity concrete as a Linux user and group, and shows exactly how the filesystem enforces access control based on it.
Mental model
Every file has an owner, a group, and three permission triples (owner/group/everyone) each specifying read, write, and execute. A process inherits the permissions of the user that launched it, so 'can this program touch that file' reduces to a single lookup: does this user, or their group, have the needed bit set on that file.
Requires
- Processes & ThreadsOperating Systems
Permissions are enforced against the user identity a process runs as; you need the concept of a process having an owner/identity before permission checks are meaningful.
- The Shell & Filesystem NavigationLinux
Permissions attach to files and directories you navigate and manipulate via the shell; you need to already be comfortable with the filesystem tree before restricting access to parts of it makes sense.
Unlocks
Used in
- chmod/chown commands controlling file access on every Unix-like system
- sudo and privilege escalation, and the security discipline of avoiding unnecessary root access
- File permission errors (Permission denied) as one of the most common beginner debugging encounters
- Docker and server security hardening, largely built on correct user/permission configuration
Projects
- Create a file, then use chmod to remove and restore specific permission bits, verifying each change's effect by attempting the restricted operation
- Explain the numeric (755, 644) and symbolic (rwxr-xr-x) permission notations and convert between them by hand
Examples
- chmod 600 secrets.env restricts a file to read/write for the owner only, blocking everyone else
- A 'Permission denied' error running a script usually means the execute bit isn't set — chmod +x fixes it
Resources
Mastery checklist
- I can read and interpret a permission string like rwxr-xr-x
- I can use chmod and chown to change a file's permissions and ownership
- I can explain why running everything as root/sudo is a security risk
- I can diagnose a 'Permission denied' error and identify the correct fix