File Permissions

umask

Set the default creation permissions mask for new files and directories.

Synopsis

syntax
umask [-S] [MODE]

Examples

Display current umask in octal
umask
Display in symbolic form (u=rwx,g=rx,o=rx)
umask -S
Set mask: owner full, group read+exec, others none
umask 027
Restrictive: owner only, no group or other access
umask 077

Common options

FlagDescription
-SOutput in symbolic form
-pOutput in form reusable as input

About umask

The `umask` command set the default creation permissions mask for new files and directories. File permission commands control access to files and directories on Linux.

The Unix permission model uses owner, group, and other categories with read, write, and execute bits. Properly managing permissions is essential for system security, multi-user environments, and running services that require specific access levels.

The command accepts 2 commonly used flags shown above, though the full set of options is available in the man page (`man umask`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More File Permissions Commands

Other commands in the File Permissions category

Related tools