WORD Pumask( WORD mode );
When a new file is created with Fcreate or a new directory created with Dcreate the initial access permissions (see Fchmod for a description of these) for the newly created file or directory are normally set so that all permissions are granted (except that execute permission is not normally granted for files). The creation mask set by Pumask determines which permissions are not to be granted by default. Thus, files created after a Pumask(S_IWOTH|S_IWGRP|S_IXOTH) call will be readable by anyone, but writable only by the owner; moreover, directories created after this call would be searchable by the owner and members of the same group, but not by anyone else.