Developer Tools

Umask
Calculator

A umask masks bits off the default permissions. Enter a umask and instantly see the resulting permissions for new files and directories.

File perms
Dir perms
Symbolic
# umask 022 (typical)
file 666 - 022 = 644
dir 777 - 022 = 755

# umask 077 (private)
file 600 dir 700
New Files (base 666)
644
-rw-r--r--
New Dirs (base 777)
755
drwxr-xr-x

Common Umask Values

Frequently Asked Questions

What does umask 022 do?
It removes write permission for group and others. New files become 644 (rw-r--r--) and new directories become 755 (rwxr-xr-x). This is the default on most Linux systems.
Why are file and directory permissions different for the same umask?
The umask is subtracted from a base of 666 for files and 777 for directories. Files never get the execute bit by default, which is why a file maxes out at 666.
How do I set a umask permanently?
Add a line like umask 027 to your shell profile (~/.bashrc or ~/.profile), or to /etc/profile for all users.
What umask is most secure?
077 gives new files 600 and directories 700 — only the owner has any access. Use it for private servers and sensitive data.

Related Tools

Chmod Calculator Crontab Generator Password Generator

Spin Up a Linux VPS in Seconds

TextraHost plans start at $5.50/mo with full root access and SSD-NVMe storage.

Trusted & Certified
HostAdvice Silver — Top 25 Reseller Hosting HostAdvice — Top 25 Offshore Hosting 2026 HostAdvice — Over 99% Uptime 2025 Website Planet Feature Accredited .xyz Registrar tawk.to Partner Green hosting verified by The Green Web Foundation AbuseIPDB Contributor Badge TextraHost on PeerPush
Join Now
Join our Telegram channel Deals, updates & support on the go.
TextraHost AI replied