What is Linux umask?

The Linux user file-creation mode mask (umask) is used to determine the file permission for newly created files. umask can be used to control the default file permission for new files. umask is a four-digit octal number.

The permission for the creation of new executable files is calculated by subtracting the umask value from the default permission value for the file type being created. An example for a text file is shown below with a umask value of 022:

        666 Default Permission for text file
       -022 Minus the umask value
        644 Allowed Permissions

Related Tutorials
• The Linux File Permissions
• How to use chmod command to change Linux file permissions
• How to use chgrp command to change Linux group ownership of a file
• How to use chown command to change linux user ownership of a file
• Linux setuid and setgid