Home › Tools

chmod calculator

Tick the permissions you want, or type an octal or symbolic mode, and get the matching chmod command.

🔒 Runs entirely in your browser. Nothing you paste is uploaded or sent to a server.

Read (4)Write (2)Execute (1)
Owner (u)
Group (g)
Others (o)
Special

As shown by ls -l:

How octal permissions work

Each digit is the sum of read = 4, write = 2 and execute = 1, for owner, group and others in that order. So 7 = 4+2+1 = rwx, 5 = 4+1 = r-x, 4 = r--, 0 = ---.

Octal Symbolic Typical use
644 rw-r--r-- normal files, web content, configs
755 rwxr-xr-x directories, scripts and binaries
600 rw------- private files: SSH keys, .env, credentials
700 rwx------ private directories such as ~/.ssh
400 r-------- read-only secrets, AWS .pem keys
775 rwxrwxr-x shared project directories for a group
777 rwxrwxrwx everyone can write: almost always a mistake
1777 rwxrwxrwt /tmp: sticky bit, users can only delete their own files

For directories, r lets you list names, w lets you create and delete entries, and x lets you enter the directory and reach files inside it. A directory without x is effectively closed even if its files are readable.

Special bits

The optional fourth (leading) digit holds setuid = 4 (run as the file owner, e.g. passwd), setgid = 2 (run as the group; on directories new files inherit the group) and sticky = 1 (on directories only the owner can delete files). In ls -l they appear as s/t in the execute position, or capital S/T when execute is not set.

Common fixes

Last updated 2026-11-01.