TapCub is live — analytics, insights and live chat, free on one platform

Free tool Chmod calculator for Linux and Unix permissions

Tick what the owner, group and everyone else may do and read the number, the symbolic string and the command. Or paste 4755 or drwxr-xr-x to decode it. Risky combinations are flagged before you run them.

  • Octal and symbolic
  • Warns about risky modes
  • Calculated locally

Build a permission mode

The example is 755, the usual mode for scripts and directories.

Calculator
WhoRead 4Write 2Execute 1Digit
Owner7
Group5
Others5
ls -l-rwxr-xr-x

Numeric form

chmod 755 deploy.sh

Symbolic form

chmod u=rwx,g=rx,o=rx deploy.sh

Ownerread the contents; change the file; run it as a program

Groupread the contents; run it as a program

Othersread the contents; run it as a program

Try a symbolic change

Combine u, g, o or a with +, - or = and r, w, x, X, s, t. For example u+x,go-w or a=rX.

g+w turns 755 into 775 (rwxrwxr-x).

umask calculator

The permissions that new files and directories do not get.

umask 022: new files get 644 (rw-r--r--), new directories 755 (rwxr-xr-x).

Common permissions

ModeSymbolicTypical use
rw-r--r--Regular files: owner edits, others read.
rwxr-xr-xDirectories and executable scripts.
rw-------Private files such as SSH private keys and secrets.
rwx------Private directories such as ~/.ssh.
r--------Read-only for the owner, nobody else.
r--r--r--Read-only for everyone.
rw-r-----Config files readable by a service group.
rwxr-x---Directories shared with one group only.
rw-rw-r--Files a team edits together.
rwxrwxr-xDirectories a team writes into.
rw-rw-rw-Anyone can edit; rarely a good idea.
rwxrwxrwxAnyone can do anything; avoid.
rwxrwxrwtShared temporary directory, like /tmp.
rwxrwsr-xTeam directory where new files keep the group.
rwsr-xr-xProgram that must run as its owner, such as passwd.
Runs entirely in your browser. Nothing you type here is uploaded or stored by TapCub.

Share these inputs: the values go after the # in the link, so they never reach a server.

Use this tool often? Save it to My tools.Saved to My tools. Find it any time at the top of the free tools page. You can also press Ctrl+D to bookmark this page in your browser.You can also press ⌘+D to bookmark this page in your browser.You can also tap your browser’s Share button (at the bottom in Safari) and choose Add Bookmark or Add to Home Screen.You can also open the ⋮ menu at the top right and tap ☆ to bookmark it, or choose Add to Home screen.You can also tap ··· at the top right and choose Favorite, or open it in your browser and bookmark it there.

Problem or suggestion?Send feedbackChat with support

Version v1.0Updated Update history

Read the result

Three groups, three permissions

Each digit is the sum of read (4), write (2) and execute (1) for one group.

  • Checkboxes, numbers and symbols
  • SUID, SGID and sticky bit
  • Copy-ready commands
Chmod calculator illustration: Tick boxes or type 755 or rwxr-xr-x to get the matching chmod commands, including SUID, SGID, sticky bit and umask
Chmod calculator, illustrated

Owner, group, others

The first digit is the file’s owner, the second members of its group, the third everyone else. Exactly one of these applies to a given user.

Files and directories differ

On a file, x means “run”. On a directory it means “enter”; without it the names may be visible but the contents are unreachable.

The fourth digit

A leading digit sets SUID (4), SGID (2) and sticky (1). In ls output they appear as s or t in the execute position, capitalised if execute is off.

umask

New files start from 666 and new directories from 777; every bit set in the umask is removed.

Permissions are only one layer: ownership, access control lists, mount options and security modules such as SELinux can still allow or block access.

How to use it

From intention to command

Decide who needs what, then copy the command.

  1. 1

    Tick or type

    Use the checkboxes, or type a number or symbolic string from ls -l. Choose file or directory so explanations match.

  2. 2

    Read the warnings

    World-writable and SUID modes are flagged. Fix the cause instead of reaching for 777.

  3. 3

    Copy the command

    Add the file name, tick recursive if needed, and copy. For trees, the find commands give directories and files different modes.

Method

How the numbers are formed

Each permission is one bit. Three bits make one octal digit, so a mode is naturally written in base 8.

  • r = 4, w = 2, x = 1; add the ones you want for each group
  • 755 = 7 (4+2+1) for the owner, 5 (4+1) for the group, 5 for others
  • Special bits are a leading digit: 4 SUID, 2 SGID, 1 sticky
  • New file mode = 666 without the umask bits; directory = 777 without them
  • X in a symbolic mode adds execute only to directories and files already executable by someone
The eight values of a digit
DigitSymbolsBinaryMeaning
0---000Nothing
1--x001Execute only
2-w-010Write only
3-wx011Write and execute
4r--100Read only
5r-x101Read and execute
6rw-110Read and write
7rwx111Everything
Worked example

Permissions for a small web project

A deploy user owns the files and the web server belongs to the same group.

Typical modes
PathModels showsReason
project directory750drwxr-x---Group can enter and list, others cannot
source files640-rw-r-----Group reads, only the owner edits
deploy.sh750-rwxr-x---Executable by owner and group
upload directory2770drwxrws---Group writes; new files keep the group
.env with secrets600-rw-------Owner only

To apply 750 to every directory and 640 to every file, run find with -type d and -type f separately; a single chmod -R 750 would mark every file executable.

Common mistakes

Permission habits to drop

Most permission problems are ownership problems in disguise.

Fixing errors with 777

It hides the real cause, usually the wrong owner or group, and lets any local process modify your files.

chmod -R with one number

Giving files and directories the same mode either breaks directory access or makes every file executable.

Forgetting parent directories

A readable file is still unreachable if a directory above it lacks execute for you.

Assuming macOS behaves the same

BSD chmod differs in corner cases, for example X combined with - or =. This page follows GNU chmod on Linux.

FAQ

Chmod questions

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What does chmod 755 mean?

The owner may read, write and execute; the group and others may read and execute. It is the usual mode for directories and for scripts everyone may run.

What is the difference between 644 and 755?

644 has no execute bits: the owner reads and writes, everyone else reads. 755 adds execute, which files need to run and directories need to be entered.

Why should I avoid chmod 777?

Every account and process on the machine can then modify or replace the file. If a web server cannot write somewhere, change the owner or group and use 750, 770 or 2770 instead.

What do SUID, SGID and the sticky bit do?

SUID makes a program run as its owner. SGID makes it run with its group, and on a directory makes new files inherit the group. The sticky bit on a directory stops users deleting each other’s files.

How do I change a whole directory tree?

chmod -R applies one mode to everything. To give directories 755 and files 644, tick recursive and copy the two find commands, or use the symbolic u=rwX,go=rX, which leaves already executable files executable.

Why did chmod 755 keep the s on my directory?

GNU chmod leaves SUID and SGID on directories alone when the numeric mode has four digits or fewer. Clear them with chmod g-s dir or chmod 00755 dir.

How does umask work?

It lists permissions to withhold from new files. With umask 022, new files are 644 and new directories 755; with 077 they are 600 and 700.

Feedback

Is this tool working for you?

Rate it, or tell us what went wrong and what you’d like improved. A person reads every message, and frequent requests go into the next update.

Rate this tool

Please don’t include passwords or other sensitive information.

Only used to reply to this feedback.

Type, details and email are required.

We only use this to handle your feedback. See the privacy policy.

Feedback received

Thank you! We will read it and reply from hello@tapcub.com if needed.

Need help right now?

Chat with our support team, best for urgent problems; you can leave a message when we are offline.

Chat with support
Changelog

Update history

New features, fixes and data refreshes for this tool, newest first.

  1. · v1.0

    LaunchedFirst release.

Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates

Cite this tool

Recommend this tool in an article or on your site

This tool is free to cite and share. Copy the URL or link below into your article, tutorial or resource page; to write a review, embed a tool or partner with us, get in touch.

URL
https://tapcub.com/tools/chmod-calculator
HTML link
<a href="https://tapcub.com/tools/chmod-calculator">Chmod calculator - TapCub</a>

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics