chmod permission calculator. Get instant, accurate results. Enter values for instant results with step-by-step formulas.
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer
Formula
r=4, w=2, x=1 | Owner-Group-Others
Convert between symbolic (rwxr-xr-x) and octal (755) Linux file permissions.
Worked Examples
Example 1: chmod 755
Problem:Octal 755
Solution:rwxr-xr-x: Owner all, Group/Others read+execute
Result:rwxr-xr-x
Frequently Asked Questions
What does chmod 777 mean?
Full permissions (read+write+execute) for everyone. Generally dangerous — use 755 for directories and 644 for files as defaults.
When would I use the execute bit on a file?
The execute bit is required to run scripts and compiled programs. Set it with chmod +x on shell scripts, Python files with a shebang line, or any binary. Without it, the OS refuses to run the file directly.
Background & Theory
Unix and Linux store file permissions as a small bit field. Nine bits cover three classes - the owning user, the owning group, and everyone else - and within each class three bits grant read, write, and execute. Because the bits carry weights of 4, 2, and 1, each class collapses to a single octal digit: 7 is rwx, 6 is rw-, 5 is r-x and 4 is r--. The familiar 755 therefore means rwxr-xr-x. On directories the bits are reinterpreted: read lists the names inside, write allows creating or deleting entries, and execute grants the right to traverse into the directory and reach a known path, which is why a directory with 644 blocks access even to files that are themselves world readable.
A fourth leading digit holds three special bits: setuid (4000) runs an executable with the file owner's identity, setgid (2000) runs with the file's group or, on a directory, makes new entries inherit that group, and the sticky bit (1000) on a shared directory such as /tmp restricts deletion to the entry's owner. Common defaults follow from the umask, usually 022, which yields 644 for regular files and 755 for directories. Practitioners treat 777 as a red flag rather than a fix, restrict private keys to 600, and note that setuid binaries are a standard privilege-escalation target. The model has real limits: it expresses only one owner and one group, so per-user exceptions require POSIX ACLs set with setfacl, and on many systems the classic bits are further constrained by SELinux or AppArmor policy and by Linux capabilities.
History
The permission model dates to the earliest Bell Labs Unix. The First Edition manual of November 1971, written by Ken Thompson and Dennis Ritchie, already documents a chmod command and a mode expressed in octal, though the layout of the bits was still being settled. The now-standard arrangement of three rwx triples for owner, group, and other, together with the setuid bit, was in place by the mid-1970s editions that circulated widely to universities. Dennis Ritchie is credited with the setuid mechanism and was granted a United States patent on it in 1979. The sticky bit originally had nothing to do with permissions: it kept a program's text segment in swap so it would reload faster, and only later was its meaning on directories redefined to stop users deleting one another's files in shared temporary space.
Standardization came with IEEE Std 1003.1, POSIX.1, first published in 1988, which fixed the semantics of the mode bits along with the chmod system call and its symbolic argument syntax, so that forms such as chmod u+x and chmod go-w behave identically across implementations. The richer POSIX.1e access control list work of the 1990s was never ratified as a standard, but its draft interfaces were implemented anyway on Linux, Solaris, and the BSDs, which is why getfacl and setfacl exist alongside chmod today. The octal notation itself survives because three bits map exactly onto one octal digit, making the nine permission bits readable at a glance.