Every file that gets created comes with a default set of permissions. If you ever want to change that default set of permissions, you can do so with the umask command. This command uses the 3-bit permission set we see in numerical permissions.
Instead of adding these permissions, however, umask takes away these permissions.
umask 021
In the above example, we are stating that we want the default permissions of new files to allow users access to everything, but for groups, we want to take away their write permission, and for others, we want to take away their executable permission. The default umask on most distributions is 022, meaning full user access, but no write access for group and other users.
When you run the umask command, it will apply that default set of permissions to any new file you create. However, if you want it to persist, you'll have to modify your startup file (.profile), but we'll discuss that in a later lesson.