How it works
Within each digit, read is 4, write is 2 and execute/search is 1. Add the selected bits for owner, group and other in that order. The output shows the nine ordinary permission bits.
Worked example
640 means owner read/write, group read and no permissions for others: rw-r-----. For a directory, execute means search/traversal rather than running a program.
Inputs, edge cases & common mistakes
This helper accepts 000–777 only. It does not model setuid, setgid, sticky bits, ACLs, ownership, mount restrictions or umask. Do not apply broad write permissions to make an unexplained access error disappear; inspect the relevant user and directory path.
Technical references
Reviewed 9 September 2026. Found an issue? Send a correction with a reproducible example.