SecurityNew

Chmod Calculator for Octal and Symbolic Modes

Convert Linux permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) and build the chmod command

100% client-side — your data never leaves your browserNo data stored or uploadedFree for lifetime · No signup
Owner (u)Group (g)Others (o)
Read (4)
Write (2)
Execute (1)
  • Owner: read, write, execute
  • Group: read, execute
  • Others: read, execute
Octalchmod 755 file
Symbolicchmod u=rwx,g=rx,o=rx file
Common permissions
rwxr-xr-xDirectories, scripts and binaries: owner can change, everyone can read and run
rw-r--r--Regular files such as HTML, CSS, config: owner writes, everyone reads
rw-------Private files: SSH private keys, .env files, credentials
rwx------Private directories such as ~/.ssh, or a personal script
rw-r-----Config readable by a service group but not by other users
rwxrwxr-xShared project directory where the group can add files
rw-rw-r--Shared file editable by the owner and group
r--r--r--Read-only for everyone
rwxrwxrwxEveryone can read, write and execute: avoid outside throwaway use
rwxrwxrwtShared temp directory like /tmp: world-writable with sticky bit
rwxrwsr-xGroup-shared directory where new files inherit the group (setgid)
rwsr-xr-xsetuid executable such as /usr/bin/passwd

How Linux file permissions and octal modes work

Every file and directory on Linux, macOS and other Unix systems has three sets of permissions: one for its owner (u), one for its group (g) and one for everyone else (o). Each set has three bits: read (r), write (w) and execute (x). For a file, execute means it can be run as a program. For a directory, read lets you list its names, write lets you create, delete and rename entries, and execute lets you enter it and reach files inside, which is why directories almost always need x wherever they have r.

Octal notation packs each set into one digit by adding read = 4, write = 2 and execute = 1. So 7 is rwx (4+2+1), 6 is rw-, 5 is r-x, 4 is r-- and 0 is ---. Three digits give owner, group and others in that order. This chmod calculator keeps the checkbox grid, the octal field and the symbolic field in sync: tick a box and both text forms update, or type 640 or rw-r----- and the boxes follow. Typing a 10-character string straight from ls -l, such as -rwxr-xr-x or drwxr-x---, also works; the leading file-type character is ignored.

chmod 755 meaning, and the other modes you will actually use

chmod 755 gives the owner read, write and execute (7) and gives the group and everyone else read and execute (5 and 5), shown as rwxr-xr-x. It is the standard mode for directories, shell scripts and installed binaries: anyone can run or browse them, but only the owner can change them. 644 (rw-r--r--) is the matching default for ordinary files such as HTML, CSS and configuration, readable by everyone and writable by the owner. 600 (rw-------) is what OpenSSH expects for a private key; ssh refuses a key that other users can read. 700 suits ~/.ssh and other private directories, 775 and 664 suit shared project directories where a team group needs write access, and 777 grants everyone full access, which is almost never the right fix for a permissions error.

The common permissions table lists these and more with their symbolic form and a typical use; click any mode to load it. The generated commands show both styles: chmod 755 file sets the exact mode, and chmod u=rwx,g=rx,o=rx file does the same with symbolic syntax, which some people find easier to read in scripts. Tick Recursive to add -R, and remember that applying a file mode such as 644 recursively to directories removes their execute bit and makes them impossible to enter. For a mixed tree, find . -type d -exec chmod 755 {} + and find . -type f -exec chmod 644 {} + are the usual pair.

setuid, setgid and the sticky bit

A fourth, leading octal digit holds the special bits: setuid = 4, setgid = 2, sticky = 1. setuid on an executable makes it run with the file owner's privileges; /usr/bin/passwd is 4755 so ordinary users can update the password database. setgid on a directory makes new files inherit the directory's group, which is useful for shared folders (2775). The sticky bit on a world-writable directory such as /tmp (1777) stops users deleting each other's files. In ls -l output they appear as s or t in the execute position, or as capital S or T when the special bit is set without execute, usually a mistake. More commands for ownership and permissions are in the Linux shell cheat sheet linked below.

How to use the Chmod Calculator for Octal and Symbolic Modes tool

  1. 1

    Set permissions

    Tick read, write and execute for owner, group and others, or type an octal mode such as 755 or a symbolic string such as rwxr-xr-x.

  2. 2

    Add special bits if needed

    Tick setuid, setgid or sticky to produce a four-digit mode like 4755, 2775 or 1777.

  3. 3

    Check the explanation

    Read the plain-English summary of who can read, write and execute, and what any special bit does.

  4. 4

    Copy the chmod command

    Enter the file or directory name, tick Recursive if needed, and copy the octal or symbolic chmod command.

Frequently asked questions

What does chmod 755 mean?

Owner: read, write and execute (7). Group and others: read and execute (5). In symbolic form it is rwxr-xr-x. It is the usual mode for directories and executable scripts.

What is the difference between chmod 644 and 755?

Both let everyone read. 755 also gives execute to everyone and is used for programs and directories; 644 has no execute bit and is used for regular files like documents, images and config.

Why is chmod 777 a bad idea?

It lets every user on the system modify or replace the file, and on a web server it lets any compromised process change your code. Fix the owner with chown or grant group access (775/664) instead.

What do s and t mean in rwsr-xr-x or rwxrwxrwt?

s in the owner or group execute position means setuid or setgid is set along with execute; t in the others position is the sticky bit. Capital S or T means the special bit is set but execute is not.

Related on TechLogHub

Get the next tool before you need it

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.