Linux Chmod File Permissions Calculator (Octal & Symbolic)
Convert Linux chmod octal (755, 644, 4750) and symbolic (-rwxr-xr-x) permissions, calculate umask, audit 777 security risks, and view breakdown tables.
Input Parameters
Calculation Results
- Octal Notation (3-Digit)
- 755
- Full Octal Notation (4-Digit)
- 0755
- POSIX Symbolic Notation
- rwxr-xr-x
- Regular File Permission String
- -rwxr-xr-x
- Directory Permission String
- drwxr-xr-x
- Owner (User) Permissions
- Read (4), Write (2), Execute (1)
- Group Permissions
- Read (4), Execute (1)
- Others (World) Permissions
- Read (4), Execute (1)
- Special Permission Bits (SetUID / SetGID / Sticky)
- None (0)
- Special Permission Bits Active
- No / Inactive
- Active Umask Filter Value
- 0022
- Default New File Mode (Base 0666)
- 0644 (-rw-r--r--)
- Default New Directory Mode (Base 0777)
- 0755 (drwxr-xr-x)
- Permission Security Risk Assessment
- Standar aman. Pengguna lain hanya memiliki izin baca/eksekusi dan tidak dapat memodifikasi file.
Validate firewall rulesets and cron timers in staging before production rollout.
| User Entity Class | Octal Digit | Read Bit (r) | Write Bit (w) | Execute Bit (x) | Effective Operations |
|---|---|---|---|---|---|
| Owner (User / u) | 7 | r (4) | w (2) | x (1) | Read (4), Write (2), Execute (1) |
| Group (g) | 5 | r (4) | - (0) | x (1) | Read (4), Execute (1) |
| Others (World / o) | 5 | r (4) | - (0) | x (1) | Read (4), Execute (1) |
chmod 755 <target>
chmod u=rwx,g=rx,o=rx <target>
chmod -R 755 <directory>
umask 022
How to Use This Tool
- Select a popular permission preset (such as 755 for public folders, 644 for web assets, or 600 for private keys) or enter a custom octal value.
- Inspect the generated symbolic notation (rwxr-xr-x), special permission flags (SetUID, SetGID, Sticky bit), and system security assessment.
- Adjust the umask filter (such as 022 or 027) to observe automatic inheritance on new files and directories, then copy the generated chmod commands.
Worked Example: Standard Web & Directory Permissions (755)
Worked example: The octal value '755' produces symbolic permissions 'rwxr-xr-x' (File: -rwxr-xr-x, Directory: drwxr-xr-x). The owner holds full control (Read, Write, Execute), while group and world receive read and execute rights only. Applying umask '022', newly created regular files default to 0644 (-rw-r--r--) and directories default to 0755 (drwxr-xr-x).
- Standard Linux Permission Preset
- 755 (rwxr-xr-x) — Public Directory & Binaries
- Octal Permission Value (3 or 4 Digits)
- 755
- System Umask Value (Default Creation Filter)
- 022
- Octal Notation (3-Digit)
- 755
- Full Octal Notation (4-Digit)
- 0755
- POSIX Symbolic Notation
- rwxr-xr-x
- Regular File Permission String
- -rwxr-xr-x
- Directory Permission String
- drwxr-xr-x
- Owner (User) Permissions
- Read (4), Write (2), Execute (1)
- Group Permissions
- Read (4), Execute (1)
- Others (World) Permissions
- Read (4), Execute (1)
- Special Permission Bits (SetUID / SetGID / Sticky)
- None (0)
- Special Permission Bits Active
- No / Inactive
- Active Umask Filter Value
- 0022
- Default New File Mode (Base 0666)
- 0644 (-rw-r--r--)
- Default New Directory Mode (Base 0777)
- 0755 (drwxr-xr-x)
- Permission Security Risk Assessment
- Standar aman. Pengguna lain hanya memiliki izin baca/eksekusi dan tidak dapat memodifikasi file.
- Octal Chmod Command
- chmod 755 <target>
- Symbolic Chmod Command
- chmod u=rwx,g=rx,o=rx <target>
- Recursive Directory Chmod Command (-R)
- chmod -R 755 <directory>
- Umask Shell Command
- umask 022
| User Entity Class | Octal Digit | Read Bit (r) | Write Bit (w) | Execute Bit (x) | Effective Operations |
|---|---|---|---|---|---|
| Owner (User / u) | 7 | r (4) | w (2) | x (1) | Read (4), Write (2), Execute (1) |
| Group (g) | 5 | r (4) | - (0) | x (1) | Read (4), Execute (1) |
| Others (World / o) | 5 | r (4) | - (0) | x (1) | Read (4), Execute (1) |
Core Concept & Engineering Notes
How It Was Calculated (Formulas & Steps)
Mathematical Formulas
- Base Permission Weights: Read (r) = 4, Write (w) = 2, Execute (x) = 1 (Sum: 0 to 7)
- Special Bits: SetUID = 4000 (s/S), SetGID = 2000 (s/S), Sticky Bit = 1000 (t/T)
- New File Mode = 0666 & ~umask, New Directory Mode = 0777 & ~umask
Step-by-Step Calculation
- Notasi Oktal = 0755 (Bit khusus = 0, Owner = 7, Group = 5, Others = 5).
- Notasi Simbolik = rwxr-xr-x (File: -rwxr-xr-x, Direktori: drwxr-xr-x).
- Perhitungan Umask (0022): Izin default file = 0666 & ~0022 = 0644; Direktori = 0777 & ~0022 = 0755.
Frequently Asked Questions (FAQ)
Why do newly created files in Linux never receive execute permissions (+x) by default?
For operating system security, the Linux kernel initializes regular files with base mode 0666 (rw-rw-rw-) rather than 0777. This prevents arbitrary text documents, downloads, or uploaded user assets from being accidentally executed as malicious binaries.
When are SetUID (4000) and SetGID (2000) permission bits applied?
SetUID is applied to system binaries that require temporary elevated privileges (like /usr/bin/passwd). SetGID is used on shared directory collaboration workspaces so that any newly created files automatically inherit the parent directory's group ownership.
What is the purpose of the Sticky Bit (1000) on the /tmp directory?
The Sticky Bit ('t' in the final symbolic slot) prevents unprivileged users from deleting or renaming files owned by others in publicly writeable shared folders. Only the file owner and superuser (root) can delete the file.
Why is permission 777 strongly prohibited on production servers?
Permission 777 (rwxrwxrwx) grants unrestricted read, modification, deletion, and execution rights to every account on the system, including web service accounts like www-data. Attackers routinely exploit 777 folders to plant web shells and compromise the host.
Related Calculators
View All Linux & DevOps Tools →POSIX 5-field cron expression generator, production crontab line builder, next 5 execution timestamps, and systemd timer unit converter.
Generate production Linux server firewall rulesets for UFW, iptables, and /etc/nftables.conf with SSH rate-limiting and trusted subnet whitelisting.
Calculate optimal Linux swap size, vm.swappiness, vm.vfs_cache_pressure sysctl tunables, default ext4 inode count, and /swapfile creation script.
Plan server maintenance windows across WIB, WITA, WIT, SGT, and UTC timezones with automated cron backup conflict detection and change notice.
References & Notes
- The Open Group Base Specifications Issue 7 / IEEE Std 1003.1-2017: chmod utility
- The Open Group Base Specifications Issue 7 / IEEE Std 1003.1-2017: umask system call
- Linux Foundation / kernel.org man pages: chmod(1) and chmod(2)
Note: Results above are mathematical estimates based on standard formulas. Always verify against official vendor documentation and site conditions before production deployment.