4.3BSD-UWisc/man/cat2/umask.2

Compare this file to the similar file:
Show the results in this format:




UMASK(2)            UNIX Programmer's Manual             UMASK(2)



NAME
     umask - set file creation mode mask

SYNOPSIS
     oumask = umask(numask)
     int oumask, numask;

DESCRIPTION
     _U_m_a_s_k sets the process's file mode creation mask to _n_u_m_a_s_k
     and returns the previous value of the mask.  The low-order 9
     bits of _n_u_m_a_s_k are used whenever a file is created, clearing
     corresponding bits in the file mode (see _c_h_m_o_d(2)).  This
     clearing allows each user to restrict the default access to
     his files.

     The value is initially 022 (write access for owner only).
     The mask is inherited by child processes.

RETURN VALUE
     The previous value of the file mode mask is returned by the
     call.

SEE ALSO
     chmod(2), mknod(2), open(2)































Printed 12/27/86           May 9, 1985                          1