Linux File Permissions Explained: chmod, Octal Modes & Visualizer

Master Linux file permissions (-rwxr-xr-x), chmod octal calculations (755, 644, 700), user/group ownership, and security hardening with an interactive visualizer.

⏱️ 8 min read•Last reviewed: October 2026

Permissions Overview

In Linux, multi-user security is enforced at the kernel level by assigning access permissions to every file and directory. Every object has an Owner (User), a Group, and Others (World), with three basic rights: Read (r), Write (w), and Execute (x).

🔍The 3 Privilege Triads
A standard Linux permission string like -rwxr-xr-x consists of 10 characters. The first character denotes file type (- for regular file, d for directory), followed by 3 triads: Owner permissions (rwx), Group permissions (r-x), and Others permissions (r-x).

Interactive Permission Visualizer

Use the interactive visualizer below to toggle octal modes (755, 644, 700, 777) and see how bits translate into symbolic notation:

Linux Permission Visualizer
chmod 755 script.sh
Presets:

Symbolic Mode String

-rwxr-xr-x

Owner (User)

7

r (4) + w (2) + x (1)

rwx

Group

5

r (4) + - (0) + x (1)

r-x

Others (World)

5

r (4) + - (0) + x (1)

r-x
Interactive Permission Visualizer Engine✓ Recommended execution permission mode

Octal (Numeric) vs Symbolic Notation

Each permission triad is calculated by summing numeric bit values: Read = 4, Write = 2, and Execute = 1.

Bit ValueSymbolPermission GrantedDirectory Effect
4rRead contents of fileList files in directory (ls)
2wModify / edit file contentsCreate or delete files in directory
1xRun file as script or binary executableTraverse directory (cd into directory)
Terminal Command
$ chmod 755 deploy.sh
Grants Owner full control (4+2+1=7: rwx), Group read and execute (4+1=5: r-x), and Others read and execute (4+1=5: r-x).
Expected Output:
-rwxr-xr-x 1 user group 1024 Oct 3 07:50 deploy.sh

Interactive Terminal Sandbox

Practice running permission commands in this browser-side simulated terminal:

bash — user@techsimplehub-sandbox:~
Educational Terminal Simulator

Type commands like ls -la, chmod 755 script.sh, pwd, whoami, ps aux...

user@techsimplehub:~$

Practice Exercise

Question 1: Production Web File Security

What octal mode should you assign to standard configuration files (like config.yaml) so that the file owner can read and write, but group members and others can only read?

Security Considerations

⚠️Never use chmod 777 in Production
Executing chmod -R 777 /var/www allows unauthenticated local users or compromised web processes to overwrite code files, inject backdoors, or execute root exploits.

Video Walkthrough

Linux File Permissions & chmod Masterclass
YouTubeLinux File Permissions & chmod Masterclass
Watch on TechSimpleHub YouTubeClick to play