chmod calculator
Tick the boxes or type an octal number. See the rwx string and a ready-to-run command.
How Unix permissions work
Each file has three sets of permissions: for its owner, its group, and everyone else. Each set is a sum of read (4), write (2) and execute (1), which is why a permission is a number from 0 to 7. Three digits give owner, group and others, so 640 is "owner read+write, group read, others nothing".
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1). It is the usual mode for programs and directories.
What does chmod 644 mean?
The owner can read and write; everyone else can only read. It is the usual mode for ordinary files.
Why not just chmod 777?
It lets every user on the system modify the file, which is a security risk and rarely necessary. Prefer the narrowest permission that works.
What does the x bit mean on a directory?
It allows entering the directory and accessing files inside it. Without x you cannot cd into it, even if you can list its name.