umask

Sets the file permission mask.

Library:LibC
Classification:POSIX
Service:File and Directory I/O

Syntax

  #include <sys/stat.h> 
   
  mode_t umask (
     mode_t   cmask);
  

Parameters

cmask

(IN) Specifies the file permission mask to be used to update the permissions (see File Access Modes and NetWare Attributes).

Return Values

Returns the previous value of the cmask parameter.

Remarks

The file permission mask is used to modify the permission setting of files. If a bit in the mask is on, the corresponding bit in the requested permission value for the file is disallowed.

On NetWare file systems, you can use the cmask parameter to set NetWare file and directory attributes.

See Also