Thuta Learning
IntermediateDevOps & Toolsbeginner

Understanding Permissions (rwx)

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Get comfortable with permissions (rwx) — no need to fear them
  • Practice running the commands yourself in the terminal
  • See how these commands come in handy on a real server or project

Let's think about it this way for a second

Break the first column of ls -l (e.g. -rwxr-xr--) into four segments — the first character is the file type (- = ordinary file, d = directory). Split the remaining 9 characters into three groups of three: Owner permission (rwx), Group permission (r-x), Others permission (r--). r = read, w = write, x = execute (permission to run). The Owner is the user who owns the file, the Group is the group tied to the file, and Others is everyone else. Think of it like the keys to a house — you alone hold the key to your own room (owner), family members (group) get a copy of the key, and guests (others) only get to peek through the window.

Let's connect this to a real-world scenario

Take -rw-r--r--: the owner has read/write access, group and others only have read access, and nobody has execute permission — most ordinary text files look like this. drwxr-xr-x means d = directory, the owner can enter/read/create inside it, while group/others can only enter and browse — if you try to run a script file without x permission, you'll get a 'Permission denied' error, and we'll cover how to fix that in the next chapter.

Let's try it together in the terminal

bash
ls -la
# -rw-r--r-- 1 alice staff  120 Jan 1 10:00 notes.txt
# drwxr-xr-x 2 alice staff 4096 Jan 1 10:00 project/
You should see
You'll be able to explain the permission string from ls -l output broken down by Owner/Group/Others.

5-Minute Try-It

Run ls -la on your home folder, and write out one file's permission string broken into its 4 segments.

A Quick Word of Caution

If the Others column has w (write) enabled, anyone can modify the file — that can be dangerous on a public server.

Easy traps

  • Mixing up rwx as 'you need all of r-w-x to run a file' — for a folder, x actually means 'permission to enter it'
  • Misreading the group column as the owner column

Now Try It Yourself

Run ls -la on your home folder, and write out one file's permission string broken into its 4 segments.

You'll know it worked when: You'll be able to explain the permission string from ls -l output broken down by Owner/Group/Others.

Understanding Permissions (rwx) | Thuta Learning