Umask

Umask (User File Creation Mode Mask) refers to a function in POSIX (Portable Operating System Interface) environments. The Umask function involves the default file system mode for new files and directories of the current process.

Umask determines the existing file permissions not set for any newly created file. This function is expressed in octal representations. The permissions of a particular file created under a Umask value are determined using a set of bitwise operations. These include bitwise AND and bitwise NOT. It should be noted that the changes will take effect only during the current session.

In terms of full access, the value for files is 666, while the value for directories is 777. In most Unix shells, a specific Umask command affecting all processes being executed is present.

Umask values can vary depending on the type of process being carried out. However, a few common Umask values are used in standard machines. One of these values is 022, which ensures that new files can only be modified by its creators. This prevents unauthorized individuals from accessing and editing the files in a particular work station.

Another example of a common Umask value is 002. This provides the appropriate amount of permission for the enabled file group. Through this value, multiple users can simultaneously access a file. This is useful in shared work areas where two or more users work on the same file.