File mode creation mask in UNIX.
On Linux and other Unix-like operating systems, new files are created with a default set of permissions. Specifically, a new file’s permissions may be restricted in a specific way by applying a permissions “mask” called the umask. The umask command is used to set this mask, or to show you its current value.
As you may know, each file on your system has associated with it a set of permissions that are used to protect files: a file’s permissions determine which users may access that file, and what type of access they have to it.
There are three general classes of users:
- The user who owns the file (“User”)
- Users belonging to the file’s defined ownership group (“Group”)
- Everyone else (“Other”)
In turn, for each of these classes of user, there are three types of file access:
- The ability to look at the contents of the file (“Read”)
- The ability to change the contents of the file (“Write”)
- The ability to run the contents of the file as a program on the system (“Execute”)
So, for each of the three classes of user, there are three types of access. Taken together, this information makes up the file’s permissions.