What is Octal Notation?

In Linux file systems, octal notation is a base-8 numeric system used to represent file permissions concisely. Instead of typing string modes like rwxr-xr-x, administrators write a 3-digit or 4-digit number like 755.

The 4-2-1 Bit Value System

Each octal digit (from 0 to 7) is calculated by adding the numeric values of enabled permission bits:

4Read (r)Value of bit 2²
2Write (w)Value of bit 2¹
1Execute (x)Value of bit 2°

Octal Values (0 to 7) Table

Octal DigitCalculationBinary TripletSymbolicPermissions Granted
00 + 0 + 0000---None
10 + 0 + 1001--xExecute only
20 + 2 + 0010-w-Write only
30 + 2 + 1011-wxWrite & Execute
44 + 0 + 0100r--Read only
54 + 0 + 1101r-xRead & Execute
64 + 2 + 0110rw-Read & Write
74 + 2 + 1111rwxRead, Write & Execute

3-Digit vs 4-Digit Format

Standard octal uses 3 digits (e.g. 755). When special bits (Setuid, Setgid, Sticky Bit) are applied, a leading 4th digit is prefixed:

  • 4000 (Setuid): Executes process with owner privileges.
  • 2000 (Setgid): Executes with group privileges or inherits group directory ownership.
  • 1000 (Sticky Bit): Restricts file deletion in public directories.

Example: 4755 sets Setuid (4) alongside Owner (7), Group (5), and Others (5).

Try the Octal to Binary & Symbolic Converter

Type any octal value in real-time to watch the bitwise matrix update.

Open Octal Converter →