Home / Guides / Octal and file permissions

Octal and file permissions

Unix file permissions are written as three octal digits.

Read, write, execute

Each permission is the sum of read(4), write(2) and execute(1), giving one digit (0-7). For example, read+write+execute = 7, and read+execute = 5.

Meaning of the three digits

The three digits are the permissions for owner, group and others. For example, chmod 755 = owner rwx(7), group r-x(5), others r-x(5).

Why octal

Because three bits map exactly to one octal digit. Use this tool to convert between octal and binary and inspect the permission bits.