chmod Calculator

Toggle permissions to get the numeric and symbolic chmod value, or type a value to see the checkboxes.

ReadWriteExecute
Owner
Group
Others
644
rw-r--r--
Owner
Group
Others

How this works

Each permission group (owner, group, others) has three bits: read (4), write (2), execute (1). Their sum gives one octal digit, e.g. read+write = 6. The full chmod value is three digits, one per group — chmod 644 file means owner can read/write, group and others can only read.

Owner is whoever owns the file (usually whoever created it, or whoever it was chown'd to). Group is every user who belongs to the file's group. Others is everyone else on the system — this is the digit that matters most for public-facing files.

Common permission codes and what they actually do

CodeSymbolicWhat happens
777rwxrwxrwxEveryone — owner, group, and others — can read, write, and execute/enter. No restriction at all; avoid on shared or public systems since any user can modify or replace the file.
755rwxr-xr-xOwner can read/write/execute. Group and others can read and execute/enter, but not modify. Typical for directories and executable scripts that need to be run or traversed by everyone.
750rwxr-x---Owner full access, group can read/execute, others get nothing. Common for directories shared within a team but hidden from everyone else.
700rwx------Only the owner can do anything at all — read, write, or execute. Group and others are completely blocked. Used for private scripts, SSH keys' containing folders, etc.
644rw-r--r--Owner can read/write. Group and others can only read — they cannot modify or execute it. The standard default for regular files like HTML, images, and documents.
640rw-r-----Owner can read/write, group can read only, others get nothing. Good for config files that a team needs to view but the outside world should never see.
600rw-------Only the owner can read or write it; no one else — not even group — can access it at all. Used for private keys, credentials, and personal data files.
400r--------Only the owner can read it, and not even the owner can write to it without changing permissions first. Group and others have no access. Used to lock down sensitive read-only files like SSH private keys.
000---------No one — including the owner — can read, write, or execute the file without first changing its permissions. Effectively locks the file away entirely.

Frequently asked questions

What does the execute bit mean for a directory vs a file?

On a file, execute lets you run it as a program. On a directory, execute lets you enter/traverse it (e.g. cd into it) — read alone lets you list contents but not access files inside.

What's a common safe default for web files?

644 for files (owner read/write, everyone else read-only) and 755 for directories (add execute so they can be traversed) are common conventions — but always match your specific security requirements.

Why is 777 usually a bad idea?

777 gives every user on the system full read, write, and execute access — anyone can overwrite, delete, or replace the file's contents, including with malicious code if it's a script. It's sometimes used temporarily for debugging but should almost never be left on a real file or directory.

Related tools