Quick answer: chmod numbers are sums of read (4), write (2) and execute (1) for owner, group and others. 755 = rwxr-xr-x (owner does everything, everyone else reads and runs), 644 = rw-r--r-- (owner writes, everyone reads), 600 = rw------- (owner only). Toggle the boxes below or type a mode to get the exact chmod command.

Mode โ‡„ Permissions

Owner user / u
Group group / g
Others all / o
755
rwxr-xr-x
chmod 755 file.txt
Owner
rwx
Group
r-x
Others
r-x
Advertisement

Common Chmod Modes Reference

CommandSymbolicWhat it grantsTypical use
chmod 777rwxrwxrwxEverything to everyone (risky)Throwaway scratch dirs only
chmod 755rwxr-xr-xOwner full; group/others read + runDirectories, shared programs
chmod 700rwx------Owner full; nobody else anythingPrivate dirs like ~/.ssh
chmod 644rw-r--r--Owner read/write; others read-onlyRegular files, web pages, configs
chmod 640rw-r-----Owner read/write; group read-onlyFiles shared with a service group
chmod 600rw-------Owner read/write onlySSH keys, .env secrets
chmod 666rw-rw-rw-Everyone can read and writeShared logs (prefer group perms)
chmod 444r--r--r--Read-only for everyoneLocking files against edits
chmod 711rwx--x--xOwner full; others may enter, not listPublic dirs with private contents
chmod 4755rwsr-xr-x755 + setuid: runs as file owner/usr/bin/passwd, sudo binaries
chmod 2775rwxrwsr-x775 + setgid dir: group inheritsTeam project directories
chmod 1777rwxrwxrwt777 + sticky: delete own files only/tmp, shared upload dirs

A lowercase s or t means the special bit is set and execute is on; uppercase S or T means the special bit is set without execute, which is usually a mistake on programs.

How the Chmod Calculator Works

Unix permissions are three triads of flags, one each for the file's owner (user), its group, and everyone else. Each triod is written either symbolically (rwx) or as an octal digit where read counts 4, write counts 2, and execute counts 1. This calculator keeps a checkbox grid, the numeric mode, and the symbolic string in sync, then hands you the exact command to run.

The formula

Digit = (read ? 4 : 0) + (write ? 2 : 0) + (execute ? 1 : 0), applied to owner, group, others in that order. A fourth leading digit works the same way for special bits: setuid 4, setgid 2, sticky 1, so 4755 splits into 4 (setuid) + 7 + 5 + 5. Going the other direction, each octal digit maps back to its bits: 7 is rwx, 6 is rw-, 5 is r-x, 4 is r--.

How to use it

Type a mode like 640 into the numeric box and watch the grid and symbolic string update. Or click the checkboxes to build the permission you want and copy the finished command. The three special-bit checkboxes prepend the fourth digit. The command uses file.txt as a placeholder; swap in your path.

A worked example

Take chmod 644, the standard mode for ordinary files. The owner digit 6 = 4 + 2, so read and write, no execute: rw-. Group and others get 4, plain read: r-- each. Full string rw-r--r--. Now chmod 755: owner 7 = 4+2+1 (rwx), group and others 5 = 4+1 (r-x), giving rwxr-xr-x, the usual choice for directories and scripts others should run but not edit.

Special bits follow the same arithmetic. /tmp runs 1777: everyone can create files (777), and the sticky 1 restricts deletion to each file's owner. A shared team directory at 2775 adds setgid so every new file inherits the directory's group instead of the creator's, keeping collaboration tidy without constant chgrp calls.

Frequently Asked Questions

What does chmod 755 mean?

chmod 755 gives the owner read, write and execute (7 = 4+2+1), while group and everyone else get read and execute only (5 = 4+1). It's the default for directories and executable programs you want others to run: rwxr-xr-x.

What does chmod 644 mean?

chmod 644 gives the owner read and write (6 = 4+2), while group and others get read-only (4). The result, rw-r--r--, is the standard permission for regular files like configs, HTML pages and source code. Nobody but the owner can modify the file.

What do the numbers in chmod stand for?

Each digit is a sum: read is 4, write is 2, execute is 1. So 7 means read+write+execute, 6 means read+write, 5 means read+execute, and 4 means read-only. The three digits apply to owner, group, and others in that order. A fourth leading digit sets special bits: setuid 4, setgid 2, sticky 1.

What is chmod 600 and when should I use it?

chmod 600 means read and write for the owner, no access at all for group or others (rw-------). Use it for private files like SSH keys (~/.ssh/id_ed25519), .env files with API secrets, and any credential file. SSH refuses to use a private key that group or others can read.

What are setuid, setgid and the sticky bit (chmod 4755, 2775, 1777)?

They're the optional fourth digit. Setuid (4) runs an executable as its owner, which is why /usr/bin/passwd can edit /etc/shadow as root. Setgid (2) on a program runs it as the file's group; on a directory, new files inherit the directory's group. Sticky (1) on a directory like /tmp (1777) lets everyone write but only delete their own files.

Is chmod 777 safe?

Almost never. 777 (rwxrwxrwx) lets every user on the system read, modify and execute the file or directory. It's a common quick fix for permission errors that instead opens the door to any local user or compromised process. Fix ownership or group membership instead, and reserve 777 for throwaway directories like test scratch space.

Advertisement