umask EXPR
umask
This function sets the umask for the process and returns the old one.
(The umask tells UNIX which permission bits to disallow when
creating a file.) If EXPR
is omitted, the function merely returns
the current umask. For example, to ensure that the "other" bits are
turned on, and the "user" bits are turned off, try something like:
umask((umask() & 077) | 7);