home blog portfolio Ian Fisher

Unix file permissions cheatsheet

24 November 2024 systems 6
Subscribe

Appendix: Numeric permission codes

Unix file permissions are commonly expressed as octal numeric strings like 755 and 644. The first digit is the permissions for the file's owner, the second for anyone in the file's group, and the third for anyone else.

You can interpret the whole string by considering each digit on its own. The trick is to remember that the order of the bits is rwx (read-write-execute) – familiar from the output of ls -l.

Some examples:

Further reading