linux rights calculator

Linux Rights & Permissions Calculator

Use this tool to calculate Linux permissions in octal and symbolic form. You can either select checkboxes or decode an octal value like 755 or 4755.

Owner (u)

Group (g)

Others (o)

Special Bits

Octal: 644

Symbolic: -rw-r--r--

chmod (octal): chmod 644 filename

chmod (symbolic): chmod u=rw,g=r,o=r filename

Ready. Default example loaded: 644.

What this Linux rights calculator does

Linux permissions control who can read, modify, or execute files and directories. This calculator helps you move quickly between the two formats admins use every day:

  • Octal notation (like 644, 755, or 2750)
  • Symbolic notation (like -rw-r--r-- or drwxr-x---)

If you've ever forgotten whether chmod 664 is too open, or needed to verify setgid/sticky bits, this page gives you a fast and reliable check.

Linux rights basics in one minute

Three permission classes

  • Owner (u) — usually the file creator.
  • Group (g) — users who share a group with the file.
  • Others (o) — everyone else on the system.

Three permission bits

  • Read (r) = 4
  • Write (w) = 2
  • Execute (x) = 1

Add the values to get each class's digit: rwx = 7, rw- = 6, r-x = 5, r-- = 4, etc.

How octal permissions are built

A standard permission string has three digits: UGO (owner/group/others).

  • 644 = owner rw-, group r--, others r--
  • 755 = owner rwx, group r-x, others r-x
  • 700 = owner full access, no access for anyone else

Special prefix digit

A fourth leading digit sets advanced flags:

  • 4 = setuid
  • 2 = setgid
  • 1 = sticky bit

Example: 2755 means setgid + 755.

Special bits and when to use them

setuid

On executables, setuid runs the program with the owner's privileges. Powerful but risky if misused.

setgid

On files, a process may run with the file's group privileges. On directories, new files inherit the directory's group—very useful for shared team folders.

sticky bit

Common on shared write directories like /tmp. It prevents users from deleting files they do not own.

Common permission patterns

  • 644 — typical for regular files (owner can edit, everyone can read)
  • 600 — private files (keys, credentials, sensitive configs)
  • 755 — typical for executable scripts and directories
  • 700 — private scripts or personal directories
  • 775 — collaborative group-writable directories

Directory behavior is different from file behavior

Permissions on directories work differently:

  • r lets users list filenames in the directory.
  • w lets users create/delete/rename entries (usually with x).
  • x lets users enter/traverse the directory.

That's why a directory often needs execute permission even if it doesn't contain scripts.

Practical command examples

chmod 644 report.txt
chmod 755 deploy.sh
chmod 2775 /srv/shared-team
chmod 1777 /tmp-like-dir

Security tips for safer defaults

  • Start restrictive, then open only what is required.
  • Avoid 777 unless you fully understand the risk and environment.
  • Use groups for collaboration instead of global write access.
  • Audit permissions regularly with ls -l and find.
  • For secrets, prefer 600 and root-owned paths when appropriate.

Final thoughts

Linux permission errors are common, but they are easy to solve once you can quickly translate between checkboxes, symbolic strings, and octal values. Use the calculator above whenever you need a fast sanity check before running chmod on production systems.

🔗 Related Calculators