Progress: 0/62 (0%)

🔐 Understanding File Permissions (rwx)

Understanding File Permissions (rwx)

Think of your Linux system as a big house with lots of rooms (files and directories). Each room can be accessed in different ways depending on who you are:
User/Owner → You, the person who owns the room.
Group → Your roommates or family members.
Others → Strangers or guests.

1.1 Permission Types: r, w, x

Every room (file) has 3 main "locks":

Permission What it means Real-life analogy
r (read) Can view the file Peeking inside the room to see what's inside
w (write) Can modify the file Rearranging furniture or adding/deleting stuff in the room
x (execute) Can run the file or enter directory Turning the light on & going inside the room

1.2 Permission Levels: user, group, others

Every file or folder has permissions for 3 categories:

Note: For directories, x doesn't mean "run," it means you can enter the directory. r lets you see the list of files inside, and w lets you create or delete files inside.

  • User (u) → 1. The owner of the file
  • Group (g) → 2. Users who belong to the file's group
  • Others (o) → 3. Everyone else

When you run:

You might see something like:

Breaking it down:

  • - → It's a regular file ( d would mean directory)
  • rwx (user) → Owner can read, write, execute
  • r-x (group) → Group members can read and execute, but cannot write
  • r-- (others) → Everyone else can only read

1.3 Real-life analogy

Imagine a shared office:
The boss (owner) has full access to a document: can read, edit, and "execute" (share it).
Team members (group) can read and share it, but not edit.
Outsiders (others) can just read it.

Permissions are basically who can do what with a file.

If you want, we can next go hands-on and see how to change these permissions with chmod in a super easy way.

Real-life analogy

Think of your Linux system as a big house with lots of rooms (files and directories). Each room can be accessed in different ways depending on who you are:
User/Owner → You, the person who owns the room.
Group → Your roommates or family members.
Others → Strangers or guests.