Linux Permissions Calculator

Interactive permission calculator with octal, symbolic, and special permissions

Interactive Permission Grid

Read (r/4)
Write (w/2)
Execute (x/1)
Owner
4
2
1
Group
4
2
1
Others
4
2
1

Permission Display

Octal Notation
644
Symbolic Notation
rw-r--r--
Full ls -l Style
-rw-r--r--
Owner rw-
6/7
Group r--
4/7
Others r--
4/7

Reverse Calculator

Symbolic Breakdown
Enter octal above
Explanation
Enter a 3-digit octal number to see the symbolic breakdown.

chmod Command Generator

Numeric Format
chmod 644 filename
Symbolic Format
chmod u=rw,g=r,o=r filename

Common Permission Presets

Special Permissions

Special permissions are added as a fourth digit before the standard permission octal. They provide advanced functionality for executable files and directories.

SUID (Set User ID)
4000
When set on an executable file, the file runs with the permissions of the file owner rather than the user executing it. Commonly used for programs like passwd that need elevated privileges. Displayed as s in owner execute position (e.g., rwsr-xr-x).
SGID (Set Group ID)
2000
On executables: runs with the group permissions of the file's group. On directories: files created inherit the directory's group rather than the creator's primary group. Displayed as s in group execute position (e.g., rwxr-sr-x).
Sticky Bit
1000
When set on a directory, only the file owner, directory owner, or root can delete or rename files within that directory. Commonly used on /tmp to prevent users from deleting others' files. Displayed as t in others execute position (e.g., rwxr-xr-t).
Combined Special Permission Value
0

Combined with Standard Permissions

Full 4-Digit Octal (Special + Standard)
0644
chmod Command with Special Permissions
chmod 0644 filename

Security Warning

Special permissions, particularly SUID and SGID on executables, can create security vulnerabilities if misused. Only set these on trusted executables from reliable sources. A compromised SUID binary can lead to privilege escalation attacks.

Linux Permissions Quiz

Question
1/15
Correct
0
Score
0%
Course Home