Developer Tools guide
Chmod Calculator Guide
This page holds the detailed reference that supports the focused interactive tool.
Open the Chmod CalculatorLinux file permissions calculator
Use this chmod calculator as a Linux file permissions calculator for rwx, octal, and command checks. Linux file permissions are controlled separately for the owner, group, and public. Each permission has a numeric value: read is 4, write is 2, and execute is 1. Add the selected values in each column to build a chmod code such as 755, 644, or 700.
Best for
Best for calculating Linux rwx permissions, converting checkboxes into octal values, reviewing chmod commands, and checking common deployment modes like 644, 755, and 775.
Not for
Not for changing permissions on your server automatically, auditing full filesystem security, or deciding access rules without understanding your hosting environment.
Common debugging workflow
Pick file or directory defaults, calculate the chmod mode, check whether execute or public write is actually needed, then compare the result with umask defaults before copying commands into a terminal.
How to use this tool
- Select read, write, and execute permissions for owner, group, and public.
- Use a preset such as
755,644,700,1777,2755, or4755when it matches your case. - Choose a file type to preview the full
ls -lpermission string, such as-rwxr-xr-xordrwxr-sr-x. - Copy the generated chmod command and replace the target name if needed.
Real examples
chmod 755 public_htmlfor a web folder that needs traversal.chmod 644 index.htmlfor a public file that should not be executable.chmod 700 ~/.sshfor a private directory only the owner should access.
Common use cases
- Prepare Linux file permissions before deploying static site files.
- Check a copied chmod number before running it in production.
- Explain rwx notation during server setup or code review.
Owner, group, and public
The first digit controls the file owner, the second digit controls the assigned group, and the third digit controls everyone else on the system.
Octal to rwx notation
A permission like 755 becomes rwxr-xr-x: the owner has full access, while group and public users can read and execute.
Safer default choices
Common defaults include 755 for folders and executable scripts, 644 for public files, and 700 for private folders.
File vs directory defaults
Directories usually need execute permission so users can traverse them. Public static files often work with 644, while public folders usually need 755.
Recursive chmod safely
Avoid one broad recursive command when files and folders need different modes. A safer static-site pattern is:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
4-digit chmod bits
Some modes include a leading digit for setuid, setgid, or sticky bit. For example, 1777 is common for shared temporary directories, 2755 can mark a setgid directory or executable, and 4755 uses setuid on an executable. This calculator shows the correct s, S, t, or T notation in the symbolic and ls -l preview, but these special bits should be used deliberately.
ls -l preview and file types
Linux ls -l output includes a leading file type character before the nine permission bits. Use the file type selector to preview regular files, directories, symbolic links, character devices, block devices, named pipes, and sockets.
Sample input/output
- Input: owner read/write/execute, group read/execute, public read/execute.
- Octal:
755. - Command:
chmod 755 folder_name.
Common errors and fixes
- Folder does not open: directories usually need execute permission to be traversed.
- Script will not run: add execute permission for the user who runs it.
- Too much access: avoid
777unless it is a short-lived local test.
Before copying chmod 777
Treat chmod 777 as a diagnostic clue, not a fix. If it makes a path work, check the current owner and group with stat -c "%U %G %a %n", confirm the process user with id, and inspect ACL inheritance with getfacl before opening write access to everyone.
Safer shared-folder fixes usually start with group ownership, chmod 2775 on the parent directory, umask 002 for new files, or a default ACL when multiple services write to the same path.
Edge cases / errors
- Chmod changes permission bits, not file ownership.
- Recursive chmod can affect many files, so test commands before applying them broadly.
- Symbolic modes such as
u+xare useful when you only need to add one bit.
Common chmod values
Use this quick table to compare chmod 755, chmod 644, chmod 600, chmod 700, chmod 775, and chmod 777 before copying a command. Remember the file vs directory execute bit difference: on files, execute means runnable; on directories, execute means traversal.
| Chmod value | rwx notation | Common use | Warning |
|---|---|---|---|
chmod 755 |
rwxr-xr-x |
Public folders and executable scripts. | Group and public can read and execute, but cannot write. |
chmod 644 |
rw-r--r-- |
Public files such as HTML, CSS, images, and config samples. | Not executable; do not use for scripts that must run. |
chmod 600 |
rw------- |
Private files, owner-only notes, local secrets, and keys. | The service must run as the owning user to read the file. |
chmod 700 |
rwx------ |
Private folders and owner-only scripts. | Group and public have no access. |
chmod 775 |
rwxrwxr-x |
Team-owned project folders and shared deploy directories. | Group can write; use only when group membership is trusted. |
chmod 777 |
rwxrwxrwx |
Temporary local debugging only. | chmod 777 unsafe: everyone can write on shared or public systems. |
Recursive chmod warning: avoid one broad recursive command when files and directories need different modes.
Permission recipes for common developer tasks
| Task | Typical permission | Command pattern |
|---|---|---|
| Static site files | Files 644, folders 755 |
find . -type f -exec chmod 644 {} \; |
| Executable script | 755 or owner-only 700 |
chmod 755 deploy.sh |
| Private SSH directory | Directory 700, private key 600 |
chmod 700 ~/.ssh |
| Shared upload folder | Policy-dependent; avoid defaulting to 777 |
Prefer group ownership plus a controlled write mode. |
Chmod vs chown vs umask
Use chmod to change permission bits, chown to change ownership, and umask to control defaults for newly created files. Read the Linux permission diagnosis guide for command-first ownership, group, mode, umask, and ACL troubleshooting, the Docker PUID, PGID, and UMASK permissions guide for bind-mounted shared folders, or the Syncthing shared folder permission guide for Docker PUID/PGID, setgid, and ACL issues.
Before running recursive chmod
List targets first, separate files from directories, and avoid copying commands into a broad path without checking the current working directory. Recursive permission changes are easy to over-apply.
Related workflow
Calculate explicit modes here, then use the Linux umask calculator to understand default permissions, the all umask values table to compare uncommon default masks, the Docker PUID, PGID, and UMASK permissions guide for bind-mounted folders and chmod 777 risk, the Linux permission diagnosis guide for command-first troubleshooting, and the chmod vs umask comparison for the quick permission model.
What is a Linux file permissions calculator?
A chmod calculator converts Linux permission choices into octal codes, symbolic rwx notation, and terminal commands.
What does chmod 755 mean?
chmod 755 means the owner can read, write, and execute, while group and public users can read and execute but cannot write.
Is chmod 777 safe?
chmod 777 is usually unsafe because it gives everyone read, write, and execute access. Avoid it on shared or public systems.
How do I use the chmod command?
Pick the permissions you need, copy the generated command, then run it in a terminal for the target file or folder.
What chmod should I use for static site files?
A common starting point is 644 for public files and 755 for folders that need traversal. Review hosting requirements before applying recursive commands.
Common chmod values explained
These seven octal modes cover most day-to-day permission work. Each entry shows the symbolic form, who can do what, a copy-ready command, and where the mode does or does not belong.
chmod 755 — rwxr-xr-x
Owner: read, write, execute. Group and public: read and execute. The standard mode for public directories and executable scripts — everyone can enter or run the target, only the owner can change it. Example: chmod 755 script.sh.
Use it for web folders that need traversal and shared read-only asset directories; many teams pair 755 directories with 644 files. Do not use it for secrets or writable upload paths, and avoid it on files that should not be executable. 775 additionally lets the group write; 700 blocks group and public entirely.
chmod 644 — rw-r--r--
Owner: read and write. Group and public: read only, no execute bit. The normal mode for regular files such as HTML, CSS, JS, text, and non-secret config samples. Example: chmod 644 file.txt.
If a script fails after chmod 644, that is expected — 644 has no execute permission; use 755 for scripts. Never use 644 on directories: without execute, the directory cannot be entered. 600 removes group and public read for private files.
chmod 777 — rwxrwxrwx
Everyone — owner, group, and public — gets full read, write, and execute. On directories it lets anyone create, delete, or rename entries. Treat it as a temporary diagnostic step in throwaway environments only, never a production fix.
If chmod 777 "solves" a problem, the real issue is usually ownership, group membership, or umask defaults. Prefer 775 (no public write), 755 (no group or public write), or a service-specific writable directory design before shipping 777 anywhere.
chmod 600 — rw-------
Owner: read and write. Group and public: nothing. The common owner-only file mode for secrets — environment files, SSH client configs, sensitive local notes. Example: chmod 600 secret.env.
If a service cannot read a 600 file, check which user the service runs as before loosening permissions — ownership is usually the real problem. For private directories use 700 instead, because entering a directory requires execute. 400 is the read-only variant.
chmod 700 — rwx------
Owner: full read, write, and execute. Group and public: nothing. The standard mode for private directories and owner-only scripts. Example: chmod 700 ~/.ssh — the .ssh directory is commonly set to 700 so only the owner can enter it.
Use it for private home subdirectories and sensitive tooling folders. For shared group directories use 750 or 775; for private files without execute use 600.
chmod 400 — r--------
Owner: read only. Everyone else: nothing. The classic mode for private key files that should not be edited in place — SSH providers often require it. Example: chmod 400 key.pem.
If you cannot edit a 400 file, that is by design; switch to 600 when the owner must update it. Never use 400 on directories — without execute even the owner cannot enter them.
chmod 775 — rwxrwxr-x
Owner and group: full read, write, and execute. Public: read and execute only. The team mode for group-writable project directories, deployment folders, and shared build output. Example: chmod 775 shared-dir.
On shared directories, combine 775 with correct group ownership and often the setgid bit so new files inherit the group. It is safer than 777 only as long as group membership is controlled; use 755 when the group should not write. New files default to group-writable modes under umask 0002 — see the umask calculator.
More Linux permission tools
Stay inside the Linux permission workflow when a chmod result points to umask defaults, container users, shared folders, or inherited ACLs.
Umask Calculator
Convert umask values into default file and directory permissions for Linux deployments.
All Umask Values Table
Search every Linux umask value and compare resulting file and directory modes.
Docker PUID, PGID, and UMASK
Diagnose bind-mounted folder writes by checking process IDs, group ownership, setgid, and default ACLs.
Umask vs Chmod Deep Guide
Decide whether the next fix belongs in chmod, umask, ownership, group membership, or ACLs.