Skip to content
/
Suscribirse Subscribe

Detrás del telón hay sistemas, no magia. Arquitectura de software, IA y computación de bajo nivel para las trincheras de producción.

Behind the curtain there are systems, not magic. Software architecture, AI, and systems engineering from the production trenches.

SYSADMIN UTILITIES #TOOL-CAT-UTILS

Linux Chmod & Umask Permissions Calculator (Octal & Symbolic)

Visual calculator and bidirectional converter between octal notation (755, 644, 2775), symbolic format (rwxr-xr-x), and umask. Supports special SUID, SGID, Sticky Bit flags, automated security auditing, and copy-paste shell commands.

🇪🇸 Abrir la versión en español de la Calculadora de Permisos Linux Chmod y Umask aquí →
COMMON PERMISSION PRESETS:

Role Permission Matrix & Special Bits

User / Owner (u)
Group (g)
Others / World (o)
Special Execution & Directory Bits:

Enter 3 or 4 digits (e.g. 755, 0755, or 2775).

9 or 10 character string (e.g. -rwxr-xr-x).

Default system umask (e.g. 022 or 027).

OCTAL NOTATION
0755
Base: 755
SYMBOLIC NOTATION
-rwxr-xr-x
Standard file format
SHELL COMMAND
chmod 755 file
UMASK CALCULATION
0022
Files: 644 · Dirs: 755
SECURITY AUDIT: STANDARD CONFIGURATION
Permissions align with the principle of least privilege. Unauthenticated or public users cannot perform unmonitored write operations.

Quick Reference Table: Common Linux Permissions

Most common permission configurations used across production Linux servers and homelabs:

Octal Simbólico File Usage Directory Usage Security Level
644 -rw-r--r-- Standard public-read files (HTML, CSS, docs) Not recommended (missing x bit to enter) ✓ Secure / Standard
755 -rwxr-xr-x Executable scripts and binaries (bash, python) Standard public directories (allows listing & cd) ✓ Secure / Standard
600 -rw------- Private credentials (SSH id_rsa, private keys) Not recommended for general folders ✓ High Security
700 -rwx------ Personal root/admin scripts Private user home directories (/root, ~/.ssh) ✓ High Security
2775 drwxrwsr-x Files inherit directory group automatically Team shared directories (SGID inheritance) ℹ Special SGID
1777 drwxrwxrwt Shared files with restricted deletion Public scratch directories (/tmp, /var/tmp) ⚠ Special Sticky
777 -rwxrwxrwx Forbidden: world-readable, writable, executable Dangerous: any user can delete or inject files ✗ Insecure (Critical)

Frequently Asked Questions About Chmod, Umask & Linux Permissions

Why do directories need the execution ('x') bit to function?

In UNIX and Linux systems, the read ('r') bit on a directory only permits listing the names of files inside it. However, to access file metadata, read file contents within the directory, or enter the folder using the 'cd' command, the execution ('x') bit is strictly required. This is why directories typically use 755 or 700 permissions rather than 644.

How does the Linux kernel calculate final permissions using umask?

The kernel applies a bitwise logic operation: Final_Permissions = Base_Permissions AND NOT(umask). For newly created files, the initial base permission is 666 (rw-rw-rw-). Under a standard umask of 022, the operation is 666 AND NOT(022) = 644 (rw-r--r--). For directories, the initial base permission is 777 (rwxrwxrwx), yielding 777 AND NOT(022) = 755 (rwxr-xr-x).

What security risks do SUID (4000) and SGID (2000) bits introduce?

The SUID (Set User ID) bit causes an executable to run with the effective privileges of the file owner (frequently root) rather than the launching user. If a SUID binary has command injection or buffer overflow flaws, unprivileged local users can instantly escalate to root. Regular audits of SUID binaries are mandatory in production.

Syncroma Dev & Sysadmin Tools · Compliant with POSIX.1-2017 and GNU Coreutils standards
Suscribirse Subscribe