DeveloperMar 10, 2026 ยท Updated Oct 13, 2026 ยท 3 min read

How to Calculate Unix File Permissions (chmod)

Octal and symbolic chmod notation, the special bits, and what read, write and execute actually do on a directory, measured as an ordinary Linux user (744 lists names but blocks every file; 777 lets anyone delete your files).

๐Ÿ”
Try the Chmod Calculator
Free, no signup
โ†’
DG
Derek Giordano
Designer & Developer
In this guide
01Permission Basics02Numeric (Octal) Notation03What r, w and x Mean on a Directory: Measured04Where 644 and 755 Come From: umask05Common Settings

Permission Basics

Every file and directory has an owner, a group and three permission sets: for the owner, for members of the group, and for everyone else. Each set has read (r), write (w) and execute (x). rwxr-xr-- means the owner can do everything, the group can read and execute, and others can only read.

Numeric (Octal) Notation

Read = 4, write = 2, execute = 1; add them per set. rwx = 7, r-x = 5, r-- = 4, so rwxr-xr-- is 754. A fourth leading digit holds the special bits: setuid (4), setgid (2) and sticky (1), so chmod 1777 is rwx for everyone plus sticky, shown by ls -l as drwxrwxrwt.

What r, w and x Mean on a Directory: Measured

On files the letters mean what they say. On directories they do not, and that is where most permission bugs live. We created a directory owned by root containing a world-readable file and tried to use it as an ordinary user (Linux, GNU coreutils; root ignores these checks, so the test needs a normal account):

Directory models (list names)cat a file insidels -l (details)
755worksworksworks
744 (r without x)worksdenieddenied
711 (x without r)deniedworks if you know the namedenied
700denieddenieddenied

Where 644 and 755 Come From: umask

New files start at 666 and directories at 777, minus the bits in your umask. With the common umask 022 you get 644 files and 755 directories; Debian and Ubuntu give users their own group and a umask of 002, which is what our test account had, producing 664 and 775. Check yours with umask.

Common Settings

ModeUse
644Ordinary files a web server only reads (HTML, CSS, images)
755Directories, and scripts that must run
600Private keys, files holding passwords; SSH refuses private keys readable by others
700Directories only you should enter, such as ~/.ssh
1777Shared scratch directories like /tmp
777Almost never: any user or compromised process can change or replace the file, and on a directory can delete others' files

The Chmod Calculator converts between checkboxes, octal (including the special-bit digit) and the ls -l string, and writes a symbolic command such as chmod u=rwx,g=rx,o=rx that chmod accepts; we checked its output against GNU chmod for 307 modes.

Frequently Asked Questions

What does chmod 755 mean?+
Owner has read+write+execute (7), group has read+execute (5), others have read+execute (5). This is the standard permission for web directories and executable scripts.
What is the difference between 644 and 755?+
755 adds execute for everyone. On a file that means it can be run; on a directory it means people can enter it and reach the files inside. Files that are only read get 644, directories and scripts 755.
Why is chmod 777 dangerous?+
Every user and every process can change or replace the file. On a directory it is worse: in our test an ordinary user deleted a read-only file owned by root from a 777 directory. If a directory really must be shared, use 1777 (sticky) so people can delete only their own files.
Try it yourself

Use the Chmod Calculator โ€” free, no signup required.

โšก Open Chmod Calculator
DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.