72 lines
1.3 KiB
HTML
72 lines
1.3 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>umask(2)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>umask(2)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
umask - set file creation mode mask
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>#include</STRONG> <STRONG><sys/types.h></STRONG>
|
|
<STRONG>#include</STRONG> <STRONG><sys/stat.h></STRONG>
|
|
|
|
<STRONG>mode_t</STRONG> <STRONG>umask(mode_t</STRONG> <EM>mask</EM><STRONG>)</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Umask</STRONG> sets the process's file mode creation mask to <EM>mask</EM> and returns the
|
|
previous value of the mask. The low-order 9 bits of <EM>mask</EM> are used
|
|
whenever a file is created, clearing corresponding bits in the file mode
|
|
(see <STRONG><A HREF="../man2/chmod.2.html">chmod(2)</A></STRONG>). 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.
|
|
|
|
|
|
</PRE>
|
|
<H2>RETURN VALUE</H2><PRE>
|
|
The previous value of the file mode mask is returned by the call.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man2/chmod.2.html">chmod(2)</A></STRONG>, <STRONG><A HREF="../man2/mknod.2.html">mknod(2)</A></STRONG>, <STRONG><A HREF="../man2/open.2.html">open(2)</A></STRONG>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|