octal

Writing numbers in base 8, using digits 0 to 7, which is the usual way to write Unix file permissions such as 600 or 755.

In more detail

Each digit covers read (4), write (2) and execute (1) for the owner, the group and everyone else, so 600 means owner read and write only. Languages mark octal with a prefix, such as 0o in Go and Python, so it is not read as decimal.

Example

os.WriteFile("probe.conf", conf, 0o600)

Related terms

Taught in

References