Skip to main content

chmod Calculator

Convert Linux chmod permissions between octal (755, 644) and rwx with checkboxes, an ls -l preview, setuid/setgid/sticky bits and presets. In your browser.

Reading rwxr-xr-x and adding up 4+2+1 in your head is error-prone, especially when a deployment is failing with Permission denied. This calculator lets you toggle read, write and execute for owner, group and others with checkboxes, type an octal value directly, or pick a preset, and it shows the octal number, the symbolic string, an ls -l style preview and the ready-to-paste chmod command all at once.

chmod Calculator
R
W
X
OWNEROwner
GROUPGroup
OTHERSOthers
Octal755
Symbolic-rwxr-xr-x
Commandchmod 755 <filename>
-rwxr-xr-x 1 user group 4096 Jan  1 00:00 filename

// chmod Calculator: Features

When 755, 644 and Permission denied come up

You need to know whether a web root should be 755 or 644. A cron script will not run and you suspect a missing execute bit. SSH refuses a private key with a bad permissions warning. A shared upload directory should let the group write but keep everyone else out. In each case the fix is a chmod command, and the calculator lets you build and double-check it visually before you run it on a production server.

Checkboxes, octal input and symbolic output in sync

The permission grid has a row for Owner, Group and Others and a column for Read, Write and Execute. Toggling any box updates the octal value, the symbolic string and the chmod command instantly. It works in the other direction too: type 640 or 4755 into the octal field and the checkboxes and special-bit toggles rearrange themselves to match. This makes it easy to see what a number you found in a tutorial actually grants.

Presets for the values you use every day

One-click presets cover the permissions that appear in almost every deployment guide: 644 for ordinary files such as HTML, CSS and images, 755 for directories and executable scripts, 600 for private keys and .env files, 700 for private directories, 775 for group-writable shared folders, 444 for read-only files, 666 for world-writable data files, and 777 for the rare case where you truly want everyone to have full access. Start from the closest preset and adjust individual bits.

setuid, setgid and the sticky bit

The special-bit section adds setuid (4), setgid (2) and sticky (1) as a leading fourth octal digit, so values such as 4755, 2775 and 1777 are fully supported. The symbolic output and ls -l preview reflect them the way the shell does, with s or S in the owner and group execute positions and t or T in the others position. This is useful when auditing binaries such as passwd, configuring group-inherited project directories, or reproducing the classic /tmp permissions.

Safe for production config files and private keys

The calculator is pure client-side JavaScript. Permission values and the generated commands are never sent to a server, so you can safely work out permissions for production configuration files and secrets here.

// chmod Calculator: FAQ

How do I read a chmod number like 755?

Each digit represents one class of user: owner, group and others, in that order. Within a digit, read is worth 4, write is 2 and execute is 1, and the digit is their sum. So 755 means the owner has 7 (4+2+1, full rwx) while group and others each have 5 (4+1, read and execute). 644 means the owner has read and write (6) and everyone else has read only (4).

How do I fix a "Permission denied" error?

For a web server, regular files are normally 644 and directories 755; scripts that must execute, such as CGI or deploy hooks, need 755. SSH private keys must be 600 or the client refuses to use them. Identify what kind of file is failing, build the matching value in the calculator, and run the generated chmod command. Also check the owner with ls -l, because the right mode on the wrong owner still fails.

What is the difference between 755 and 644?

755 (rwxr-xr-x) gives the owner full control and lets everyone else read and execute; use it for directories and executable scripts. 644 (rw-r--r--) lets the owner read and write and everyone else read only; use it for ordinary files such as HTML, CSS, JavaScript, PHP and images. These two values cover most of what a typical website needs.

Is chmod 777 safe?

Almost never. 777 lets any user on the system read, modify and execute the file or write into the directory, which is a common route to a compromised web server. "It only worked after I set 777" usually means the file has the wrong owner rather than insufficient permissions. Fix ownership with chown and use the minimum mode required, typically 644 or 755.

What are setuid and setgid?

setuid (octal 4 in the leading digit) makes an executable run with the file owner's privileges instead of the caller's; passwd uses it to update a root-owned file. setgid (2) makes an executable run with the file's group, and on a directory it causes new files to inherit the directory's group, which is handy for shared project folders. Enter 4755 or 2775 in the calculator to see how they appear in ls -l.

What does the sticky bit do?

On a directory, the sticky bit (octal 1 in the leading digit) allows only a file's owner, the directory's owner or root to delete or rename files inside it, even if the directory is world-writable. /tmp is the classic example, with mode 1777. On modern Linux the sticky bit has no effect on regular files.

How do I read the symbolic form rwxr-xr-x?

The nine characters are three groups of three, for owner, group and others. In each group r means read, w means write, x means execute and a dash means the permission is absent. This is exactly the format ls -l prints, after the leading character that indicates the file type. The calculator's ls -l preview shows the string in context.

Why does a directory need the execute bit?

On a directory, execute means permission to enter it and access files by name, while read means permission to list its contents. A directory with mode 644 can be listed but not entered, so files inside become unreachable. That is why directories are almost always 755 or 750: read and execute go together.

Can I use symbolic chmod arguments like u+x instead of numbers?

Yes. chmod also accepts changes such as u+x (add execute for the owner), g-w (remove write for the group) or o=r (set others to read only), where u, g, o and a stand for user, group, others and all. Use the calculator to see the resulting rwx string, then apply either the octal value it generates or the equivalent symbolic change on the command line.

Are the permission values sent to a server?

No. All conversion happens in your browser and the values you enter are never transmitted. It is safe to use while planning permissions for private keys and production configuration. If you are also automating tasks on the same host, the Cron Expression Parser verifies your schedules, and the Subnet Calculator helps with the firewall rules around it.

// How to Use chmod Calculator

  1. Set permissions

    Click the R, W and X checkboxes for Owner, Group and Others, type an octal value such as 755 or 4755 into the number field, or pick a preset. Toggle setuid, setgid or sticky in the special bits section if you need them.

  2. Check the result

    The octal value, the symbolic string such as rwxr-xr-x, the chmod command and an ls -l style preview update in real time. Confirm that the preview matches what you expect to see on the server.

  3. Copy the command

    Use the COPY buttons to copy the octal value, the symbolic string or the full command, replace <filename> with your path, and paste it into your terminal or SSH session.

Category Network