If you’ve ever felt a little lost staring at output like -rwxr-xr--, don’t worry—you’re not alone. File permissions in Linux might look cryptic at first, but once you understand the logic behind them, they’re actually pretty simple. And more importantly, they’re your first line of defense in keeping your system secure.
Let’s break it down together, nice and easy.
The Basics: Who Can Do What?
Linux assigns permissions to three types of people (or rather, “categories”):
- User (u) – the file’s owner (usually you).
- Group (g) – users who belong to the file’s group (like teammates in a project).
- Others (o) – everyone else on the system.
And for each of those, there are three possible actions:
- Read (r) – look inside the file (or list a directory’s contents).
- Write (w) – change the file (or add/remove files in a directory).
- Execute (x) – run the file as a program (or enter a directory).
Still with me? Good. Let’s see what that looks like in real life.
Reading the ls -l Secret Code
Run ls -l in a terminal, and you might see something like this:
-rwxr-xr-- 1 user group 4096 Mar 12 10:00 example.txt
That first chunk – -rwxr-xr-- – tells the whole story. Here’s how to decode it:
| Part | Means |
|---|---|
- | It’s a file (d would mean directory) |
rwx | User can read, write, execute |
r-x | Group can read and execute (but not write) |
r-- | Others can only read |
So in plain English: the owner has full control, the group can run it but not change it, and everyone else can just look at it.
Changing File Permissions in Linux with chmod
You have two ways to tweak permissions – and both work great. Pick whichever feels more natural.
1. Symbolic Notation (Letters)
Use + to add, - to remove, and = to set exactly.
- Make the file executable for the user:
chmod u+x example.txt - Take away write permission from the group:
chmod g-w example.txt - Give others read‑only access (and nothing else):
chmod o=r example.txt
You can even combine them: chmod u+x,g-w example.txt
2. Octal Notation (Numbers)
This one feels like a secret handshake at first, but it’s super efficient. Each permission has a number:
- Read = 4
- Write = 2
- Execute = 1
Add them up for each category. For example, 7 (4+2+1) means read+write+execute.
5 (4+1) means read+execute.
4 alone means read‑only.
So chmod 751 example.txt means:
- User gets 7 → read, write, execute
- Group gets 5 → read and execute
- Others get 1 → execute only
Much shorter than the symbolic way, right?
Double-Check Your Work
After changing permissions, always peek at the result:
ls -l example.txt
If it shows exactly what you wanted – great. If not, no worries, just run chmod again.
Wrapping Up (and a friendly tip)
Learning Linux permissions is one of those skills that pays off every single day – whether you’re securing a server or just making sure your roommate doesn’t accidentally delete your homework. 😄
Practice with a few test files, and soon enough you’ll be reading -rwxr-xr-- like a pro.
Happy coding – and happy permission‑tweaking!
GhostLock: A 15-Year Linux Kernel Bug Has a 5-Second Public Root Exploit
A Linux kernel vulnerability that has been hiding in plain sight since 2011 was publicly disclosed o…
How to Install Linux on a Laptop: A Step-by-Step Guide – 2026
Switching to Linux can breathe new life into an aging laptop, boost your privacy, and hand you full …
Pedit COW Explained: The Linux Kernel Flaw Letting Local Users Become Root
A new Linux kernel vulnerability nicknamed “pedit COW” has become one of the biggest sec…
The AUR Malware Attack Exposed a Fact Most Arch Users Don’t Know
Here is something most Arch Linux users have never thought carefully about: the Arch User Repository…
Ctrl+C Ctrl+V Not Working in Terminal? Here’s Why (Linux)
Ctrl+C Ctrl+V not working in terminal is one of the most common points of confusion for anyone new t…
Best Linux VPS Hosting in 2026 (Compared for Developers)
A Linux VPS gives you your own isolated slice of a physical server — dedicated RAM, guaranteed CPU, …

Smart Home Automation Ideas for Beginners (2026): 10 Easy Setups That Actually Work






