# Chmod Calculator

URL: https://phishdestroy.io/developer-tools/chmod-calculator
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Convert Unix file permissions between the octal form used by chmod (755, 640) and the rwx form shown by ls -l.

## Example input

Private config file

```
640
```

rw-r----- and chmod 640 filename: the owner can read and write, the group can read, and others have no access.

## FAQ

### How is the octal number calculated?

Each digit is the sum of read (4), write (2) and execute (1) for one class, in the order owner, group, others. So 755 is rwxr-xr-x, 644 is rw-r--r-- and 600 is rw-------.

### Does it handle setuid, setgid, the sticky bit or 0644?

No. Only the first three digits are read, so 4755 is taken as 475 and 0644 as 064. Type modes without a leading 0, and add special bits with chmod u+s, g+s or +t yourself.

### Does it change files on my system?

No. It only calculates in your browser and nothing is uploaded; run the chmod command yourself.

## Related tools

- [Apache .htaccess Snippets](https://phishdestroy.io/developer-tools/htaccess-snippets)
- [Docker Run to Compose Converter](https://phishdestroy.io/developer-tools/docker-run-to-compose)
- [Cron Schedule Builder](https://phishdestroy.io/developer-tools/cron-schedule-builder)
- [Git Cheat Sheet](https://phishdestroy.io/developer-tools/git-cheat-sheet)

All tools: https://phishdestroy.io/developer-tools
