Chmod Calculator
Calculate Unix file permissions.
Permissions
| Who | Read | Write | Execute | Digit |
|---|---|---|---|---|
| owner | 6 | |||
| group | 4 | |||
| other | 4 |
Result
Octal
644
Symbolic
-rw-r--r--
chmod
chmod 644 path/to/file
Recursive
chmod -R 644 path/to/dir
Node
await fs.chmod("path/to/file", 0o644);
From octal
Common modes
644Regular files
755Scripts and directories
600Private keys, .env
700Private directories
664Group-writable files
775Group-writable directories
777Everything, for everyone
444Read-only
Reading the bits
- 4 read · 2 write · 1 execute
- Add them per column: 4+2+1 = 7 (all), 4+2 = 6, 4+1 = 5.
- On directories, execute means “may enter”, not “may run”.

