In computing, umask is a command that determines the settings of a mask that controls how file permissions are set for newly created files. It may also affect how the file permissions are changed explicitly. is also a function that sets the mask, or it may refer to the mask itself, which is formally known as the file mode creation mask. The mask is a grouping of bits, each of which restricts how its corresponding permission is set for newly created files. The bits in the mask may be changed by invoking the command. Overview In Unix-like systems, each file has a set of attributes that control who can read, write or execute it. When a program creates a file, the file permissions are restricted by the mask. If the mask has a bit set to "1", then the corresponding initial file permission will be disabled. A bit set to "0" in the mask means that the corresponding permission will be determined by the program and the file system. In other words, the mask acts as a last-stage filter that strips away permissions as a file is created; each bit that is set to a "1" strips away its corresponding permission. Permissions may be changed later by users and programs using chmod. Each program (technically called a process) has its own mask and is able to change its settings using a function call. When the process is a shell, the mask is set with the command. When a shell or process launches a new process, the child process inherits the mask from its parent process. Generally, the mask only affects file permissions during the creation of new files and has no effect when file permissions are changed in existing files; however, the command will check the mask when the mode options are specified using symbolic mode and a reference to a class of users is not specified. The mask is stored as a group of bits. It may be represented as binary, octal or symbolic notation. The command allows the mask to be set as octal (e.g. ) or symbolic (e.g. ) notation. The command is used with Unix-like operating systems, and the function is defined in the POSIX.1 specification. History The mask, the command and the function were not part of the original implementation of UNIX. The operating system evolved in a relatively small computer-center environment, where security was