1 .\" Copyright (c) 1980 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)umask.2 6.1 (Berkeley) 5/9/85
7 .TH UMASK 2 "May 9, 1985"
10 umask \- set file creation mode mask
14 #include <sys/types.h>
17 mode_t umask(mode_t \fImask\fP)
22 sets the process's file mode creation mask to \fImask\fP
23 and returns the previous value of the mask. The low-order
24 9 bits of \fImask\fP are used whenever a file is created,
25 clearing corresponding bits in the file mode
28 This clearing allows each user to restrict the default access
31 The value is initially 022 (write access for owner only).
32 The mask is inherited by child processes.
34 The previous value of the file mode mask is returned by the call.