# Chmod Calculator

Convert between chmod numeric and symbolic permission notation. Toggle read, write, execute for owner, group, and others to get the octal code and command.

## What this calculates

Toggle permissions for owner, group, and others to instantly see the numeric (octal) code, symbolic notation, and the chmod command to run. No more memorizing permission numbers.

## Inputs

- **Owner Read**
- **Owner Write**
- **Owner Execute**
- **Group Read**
- **Group Write**
- **Group Execute**
- **Others Read**
- **Others Write**
- **Others Execute**

## Outputs

- **Numeric (Octal)** — formatted as text — Three-digit octal permission code
- **Symbolic** — formatted as text — rwx notation for owner, group, others
- **Chmod Command** — formatted as text
- **Typical Use** — formatted as text — Common file types that use this permission
- **Owner** — formatted as text
- **Group** — formatted as text
- **Others** — formatted as text

## Details

How Unix permissions work:

Every file and directory has three permission groups: owner, group, and others. Each group can have read (r=4), write (w=2), and execute (x=1) permissions. Add the values together to get the octal digit for each group.

Common permission sets:

  - 755 -- owner can do everything, everyone else can read and execute. Standard for directories and scripts.

  - 644 -- owner can read and write, everyone else can only read. Standard for regular files.

  - 600 -- only the owner can read and write. Use for SSH keys and config files with passwords.

  - 777 -- everyone can do everything. Almost always a bad idea in production.

  - 400 -- owner can read only. Common for .pem certificate files.

The octal math:

  - Read = 4

  - Write = 2

  - Execute = 1

  - Read + Write = 6

  - Read + Execute = 5

  - Read + Write + Execute = 7

## Frequently Asked Questions

**Q: What is the difference between 755 and 644?**

A: 755 gives the owner full control and allows everyone else to read and execute. 644 gives the owner read/write and everyone else read-only. Use 755 for directories and executable scripts, 644 for regular files like HTML, CSS, and images.

**Q: Why should I never use chmod 777?**

A: 777 means every user on the system can read, write, and execute the file. On a web server, this means any compromised process could modify your files. Use the most restrictive permissions that still allow your application to function (usually 755 for directories and 644 for files).

**Q: What does the execute permission do for directories?**

A: For directories, execute means 'traverse' -- the ability to cd into the directory and access files inside it. A directory with read but not execute lets you list filenames but not open any files. Most directories need the execute bit set.

**Q: How do I set permissions recursively?**

A: Use chmod -R to apply permissions to a directory and everything inside it. For example, chmod -R 755 foldername/. Be careful with recursive chmod because files and directories often need different permissions. A common pattern is: find . -type d -exec chmod 755 {} + for directories and find . -type f -exec chmod 644 {} + for files.

---

Source: https://vastcalc.com/calculators/everyday/chmod
Category: Everyday Life
Last updated: 2026-04-08
