Line | |
---|
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.
|
---|
4 | .\"
|
---|
5 | .\" @(#)umask.2 6.1 (Berkeley) 5/9/85
|
---|
6 | .\"
|
---|
7 | .TH UMASK 2 "May 9, 1985"
|
---|
8 | .UC 4
|
---|
9 | .SH NAME
|
---|
10 | umask \- set file creation mode mask
|
---|
11 | .SH SYNOPSIS
|
---|
12 | .nf
|
---|
13 | .ft B
|
---|
14 | #include <sys/types.h>
|
---|
15 | #include <sys/stat.h>
|
---|
16 |
|
---|
17 | mode_t umask(mode_t \fImask\fP)
|
---|
18 | .ft R
|
---|
19 | .fi
|
---|
20 | .SH DESCRIPTION
|
---|
21 | .B Umask
|
---|
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
|
---|
26 | (see
|
---|
27 | .BR chmod (2)).
|
---|
28 | This clearing allows each user to restrict the default access
|
---|
29 | to his files.
|
---|
30 | .PP
|
---|
31 | The value is initially 022 (write access for owner only).
|
---|
32 | The mask is inherited by child processes.
|
---|
33 | .SH "RETURN VALUE
|
---|
34 | The previous value of the file mode mask is returned by the call.
|
---|
35 | .SH SEE ALSO
|
---|
36 | .BR chmod (2),
|
---|
37 | .BR mknod (2),
|
---|
38 | .BR open (2).
|
---|
Note:
See
TracBrowser
for help on using the repository browser.