TechEarl

Chmod Calculator: Permissions to Octal, Live

An interactive chmod calculator: tick the read/write/execute boxes for owner, group, and other to get the octal and the exact chmod command, or type 644 to see what it grants.

Ishan Karunaratne⏱️ 5 min readUpdated
Share thisCopied
Interactive chmod permissions calculator: toggle read, write, and execute for owner, group, and other to get the octal value and the chmod command, or type an octal to see what it grants.

Tick the boxes for what each class of user should be allowed to do and the calculator gives you the octal value and the exact chmod command. Or type an octal like 644 and watch it decode the other way.

chmod permissions calculator
Read4Write2Execute1ownergroupother
Special
Symbolicrw-r--r--
chmod 644 filename

Owner can read, write; group can read; others can read.

AI CLI prompt

Paste this into your terminal AI and it runs the command for you, installing the tool first if you do not have it. Works with Claude Code, OpenAI Codex CLI, Gemini CLI, GitHub Copilot CLI, Aider, Cursor Agent, Warp, OpenCode, Cline and any other CLI coding agent.

prompt
Goal: apply these Unix file permissions to the target path.

Run this command in my shell:

    chmod 644 filename

Before you run it, tell me in one line exactly what it changes. Never run it as root or recursively against a system path. Run only this command, nothing else, and confirm the result when it is done.

You run this at your own risk. An AI agent can execute commands on your machine; review what it does before approving. TechEarl is not liable for the outcome, see the Terms of Service.

Quick presets
ModeSymbolicUsed for

Tap any mode to load it, set the path and scope, then copy the command. Your selection is saved on this device.

How the number works

In octal, rwx = 7, rw- = 6, r-x = 5, r-- = 4, -wx = 3, -w- = 2, --x = 1, --- = 0. Each of the three classes, owner, group, and other, gets one of those digits, and that digit is just the sum of three values: read = 4, write = 2, execute = 1. Add them up per class and you get one of eight possibilities:

DigitSymbolicAllows
7rwxread + write + execute
6rw-read + write
5r-xread + execute
4r--read only
3-wxwrite + execute
2-w-write only
1--xexecute only
0---nothing

So a mode like 750 reads as owner 7 (rwx), group 5 (r-x), other 0 (---). Three digits, the whole permission grid.

The modes you reach for most

644 is rw-r--r-- (the owner reads and writes, everyone else reads) and 755 is rwxr-xr-x (the same, plus execute for everyone). Those two cover almost everything:

  • 644, a normal file: you edit it, everyone else can read it.
  • 755, a script or a directory: you have full access, others can read and run/enter it.
  • 600, a private file like an SSH key: owner only.
  • 700, a private directory: only you can enter it.
  • 775 / 664, a shared team directory / file, where the group can write too.
  • 777, everyone can do everything. Almost never the right answer; it is the mode people reach for to "make it work" and regret later.

For the full read/write/execute model, files versus directories, and symbolic chmod, see Linux file permissions explained.

The fourth digit: setuid, setgid, sticky

Tick the special boxes and a fourth digit appears in front. It is setuid = 4, setgid = 2, sticky = 1, added the same way:

  • setuid (4755) makes a program run as its owner, which is why passwd can edit /etc/shadow.
  • setgid (2775) on a directory makes new files inherit the directory's group, the trick behind a shared team folder.
  • sticky (1777) on a world-writable directory like /tmp means only a file's owner can delete it.

The full breakdown is in setuid, setgid, and the sticky bit explained.

Apply it on the command line

Copy the command from the calculator and run it:

bash
chmod 644 notes.txt
chmod 755 deploy.sh

To apply a mode down a whole directory tree without breaking your directories, use the capital-X trick rather than a blind -R 644; see how to chmod recursively.

FAQ

644 sets a file to rw-r--r--: the owner can read and write (6 = 4+2), and group and other can read only (4). It is the standard mode for a normal, non-executable file. Scripts and directories use 755, which adds the execute bit.

Add read = 4, write = 2, execute = 1 for each class. rwx = 7, rw- = 6, r-x = 5, r-- = 4. Do it for owner, group, and other to get the three-digit octal. The calculator above does this both ways as you click.

Almost never. 777 lets every user on the system read, write, and execute the file. It is the mode people set to make a permission error go away, and it usually opens a real security hole. Work out the minimum the task needs (often 644 or 755) instead.

See also

Sources

Authoritative references this article was fact-checked against.

TagsLinuxchmodPermissionsOctalCalculatorCLI

Found this useful? Pass it on.

Copied

Ishan Karunaratne

Software Systems Architect · Senior Software Engineer · Engineering Leadership

Software systems architect and senior software engineer with more than two decades designing, building, and running production software, Linux systems, and DevOps infrastructure, and lately working AI into the stack. Now a CTO, though what I write here is drawn from the full arc of that work, across architecture, engineering, and operations, not any single job.

Keep reading

Related posts

Bluehost honest review. Where it fits in 2026, the real operational ceiling, the migration path when sites outgrow it. From an agency operator's perspective.

Bluehost for WordPress: Honest Take for Small Sites

Bluehost has the WordPress.org recommendation and the lowest entry-tier price in mainstream hosting. The honest take on where Bluehost legitimately fits in 2026, the real operational ceiling, and the migration path for sites that outgrow it.