umask
umask() sets the calling process’s file mode creation mask (umask) to mask & 0777 (i.e., only the file permission bits of mask are used), and returns the previous value of the mask.

umask
umask [PERMISSIONS]
777 = No permissions
000 = All permissions
666 umask = 111 chmod
555 = 222
444 = 333
333 =444
umask 027 = chmod 750
umask g-x
This will remove a permission.