umask (user mask)

The umask is the way to state the permissions that will be taken away from a fully read, write and executable file to give you the permissions to a new file or directory. This command is never used to change the permissions of existing files or directories.

To get new files and directories created to have permissions of

rwx   r-x   r-x (755 is the default in most distributions)

Instead of using chmod to set the permissions of each file or directory created, you would use the umask command to set the every new file or directory to have permissions with the  --- -w-  -w- (Group and Other Write) permissions removed from them. By removing the Group and Other Write permissions from a fully read, write and executable file, you are left with default permissions of  rwx   r-x   r-x permissions (755) for each created file or directory.

User read, write and execute,
Group read, write and execute,
Other read, write and execute
Removing the Group and Other write permissions User read, write and execute,
Group write and execute,
Other write and execute
(UMASK)
(U+RWX G+RWX O+RWX) [777]  - (U G+W O+W) [022] (U+RWX G+WX O+WX) [755]
( RWX  RWX  RWX )  [777] - (--- -W- -W-) [022] = (RWX  R-X R-X) [755]
[777] - [022] = [755]