Linux6h estimated

Permissions & Users

Difficulty
Importance

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

Unlocks

Used in

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