Umask

Umask

umask (user mask) is a command and a function in POSIX environments that sets the file mode creation mask of the current process which limits the permission modes for files and directories created by the process. A process may change the file mode creation mask with umask and the new value is inherited by child processes. When a shell (as with an output redirect) or other program creates a file or directory, it may specify permissions to be granted, however, permissions that the file mode creation mask does not allow are removed.

Read more about Umask.