The umask value will be used to appropriately modify the default fmask for file permissions (base permission 0666) and dmask for directory/folder permissions (base permission 0777).

The effective fmask and dmask values will be calculated by deducting the umask value (Octal calculations).

So a umask 0022 would result in fmask to get a value 0644 (i.e. 0666 – 0022) while dmask would be 0755 (i.e. 0777 – 0022).

The umask 0077 prevent files from being created with any access not only to the world (indicated by the ultimate octal digit) but also your group members (indicated by the penultimate octal digit).

 

https://askubuntu.com/questions/186747/why-umask-077-does-not-allow-user-to-execute-files-directories

https://en.wikipedia.org/wiki/Umask