Skip to content
QKQuickKit日本語
ReferenceLOCALRuns in your browser

Linux Permissions Reference

Cheat sheet for Unix file permissions: the rwx bits, octal digits, setuid/setgid/sticky, common modes, and umask.

This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.

Permission bits

BitValueOn a fileOn a directory
r4Read the file's contentsList the names in the directory
w2Modify the file's contentsCreate, delete, and rename entries (with x)
x1Execute the file as a program or scriptEnter the directory and access entries by name

Octal digit values

DigitSymbolic
0---
1--x
2-w-
3-wx
4r--
5r-x
6rw-
7rwx

Special bits (leading digit)

BitValuels characterEffect
setuid (u+s, 4)4s / SRun an executable as its owning user; ignored on most shells' scripts
setgid (g+s, 2)2s / SRun as owning group; on a directory, new entries inherit the group
sticky (+t, 1)1t / TOn a directory, only an entry's owner (or root) can delete or rename it

Common modes

ModeSymbolicTypical use
644rw-r--r--Regular file: owner writes, everyone reads
664rw-rw-r--Shared file writable by the group
640rw-r-----Owner writes, group reads, others nothing
600rw-------Private file: owner only
444r--r--r--Read-only for everyone
400r--------Owner read-only, no one else
755rwxr-xr-xDirectory or executable: owner writes, everyone traverses/runs
775rwxrwxr-xGroup-shared directory
750rwxr-x---Owner and group only, others no access
700rwx------Private directory: owner only
777rwxrwxrwxAnyone can read, write, and execute — avoid
1777rwxrwxrwtWorld-writable directory with the sticky bit, like /tmp
2755rwxr-sr-xDirectory where new files inherit the group
4755rwsr-xr-xExecutable that runs as its owner, like /usr/bin/passwd

umask defaults

umaskNew directoryNew fileTypical use
022755644Common default for a single-user or server system
002775664Group-collaboration default (user private groups)
027750640Others get no access — hardened default
077700600Owner only — most restrictive common umask

Behaviour of the execute bit on directories, setgid inheritance, and ACLs varies by filesystem and platform. Verify on the target system.

How it works

A static reference for POSIX file mode bits. The rwx bits mean different things for a regular file and for a directory: on a directory, r lists names, w creates and removes entries, and x allows traversing into it. Each octal digit 0–7 is the sum of r (4), w (2), and x (1). A leading fourth digit carries setuid (4), setgid (2), and the sticky bit (1); `ls` shows those in the execute column as s/t, or capital S/T when the matching execute bit is off. The common-modes table shows the symbolic form and typical use of familiar values like 644, 755, and 1777. The umask table shows the default file and directory modes each common umask produces. To compute a specific mode, use the Chmod Calculator.