Skip to content
Optimal Lab

DevOps · interactive

File permissions

Every file has an owner, a group, and three sets of read/write/execute bits: for the owner, for members of the group, and for everyone else. Linux checks exactly one set per user: the first that applies.

-rwxr-xr-- alice web deploy.sh

chmod 754 deploy.sh

owner (alice)

7

group (web)

5

others

4

userusesread itedit itrun it
aliceowner✓✓✓
deploygroup✓✗✓
guestothers✓✗✗

Each digit is r=4 + w=2 + x=1. 754 gives alice rwx, the web group r-x, everyone else r--.

Common modes

  1. 1

    If you own the file, only the owner bits count; else if you're in its group, the group bits; else the others bits.

    An owner can have fewer rights than others.

  2. 2

  3. 3

  4. 4

In production

Tools and technologies

Every Linux system and container uses these bits.

Not tied to one language — use these names when you search docs or design a system.