umask

umask is a permission mask that turns off permission bits. It’s normally defined in either /etc/profile or /etc/login.defs as a system configuration on shared systems (e.g. SSH / TELNET hosts), to reduce the default permissions applied by processes to files created by users.

To view the current umask setting, open a terminal and run the command

umask

To change the current umask to something else, e.g. 077, enter it as folows:

 umask 077

in this example, 077 means:

  • 0: Do nothing on the owner permission
  • 7: Turn the group permissions off
  • 7: Turn the world permissions off