Understanding Unix & Linux File Permissions
In POSIX-compliant operating systems such as Linux, macOS, and BSD, access control for every file and directory is governed by a file permission mode. The operating system enforces access rules by evaluating rights assigned across three distinct target roles: the file Owner (u), the assigned Group (g), and all Others / World (o).
Permissions are expressed in two primary formats: Octal Notation (numerical values like 755 or 644) and Symbolic Notation (string sequences like rwxr-xr-x or rw-r--r--). The Toolzeno Unix Permission Calculator provides real-time conversion, security risk inspection, and executable chmod command generation.
Permission Bit Values & Octal Math
Each role contains three basic permission bits. Octal values are calculated by summing the numerical scores of active rights:
Grants permission to view file contents or list directory files using ls.
Grants permission to edit file contents, modify, create, or delete files inside directories.
Grants permission to execute binaries/scripts or enter directories (traverse with cd).
Special Permissions: SUID, SGID, and Sticky Bit
In addition to standard Read/Write/Execute bits, Unix supports three special permission flags represented as a 4th leading octal digit:
- SUID (Set User ID = 4000): Appears as
sin owner execute field (e.g.rwsr-xr-x). Executes binaries under the rights of the file owner. - SGID (Set Group ID = 2000): Appears as
sin group execute field (e.g.rwxr-sr-x). Forces newly created files inside a directory to inherit group ownership. - Sticky Bit (= 1000): Appears as
tin others execute field (e.g.rwxrwxrwt). Ensures users can only delete or rename their own files inside world-writable directories like/tmp.
Common Unix Permission Standards
| Octal | Symbolic | Description | Standard Recommendation |
|---|---|---|---|
| 600 | rw------- | Private Owner Read/Write | SSH private keys (~/.ssh/id_rsa), .env secrets |
| 644 | rw-r--r-- | Standard Public File | HTML, CSS, JS, static web server documents |
| 755 | rwxr-xr-x | Standard Public Directory | Web directories, shell scripts, CLI binaries |
| 700 | rwx------ | Private Directory | SSH key folders (~/.ssh), private backup stores |
| 1777 | rwxrwxrwt | Sticky Bit Temp Folder | Shared system temp folders (/tmp, /var/tmp) |
100% Client-Side Privacy Guarantee
Toolzeno processes all file permission calculations, conversions, and command generation locally inside your browser sandbox. No file names, server data, or permission configurations are transmitted to remote servers.