|
|
1.1 root 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: .ft B
13: oumask = umask(numask)
14: .br
15: int oumask, numask;
16: .ft R
17: .SH DESCRIPTION
18: .I Umask
19: sets the process's file mode creation mask to \fInumask\fP
20: and returns the previous value of the mask. The low-order
21: 9 bits of \fInumask\fP are used whenever a file is created,
22: clearing corresponding bits in the file mode
23: (see
24: .IR chmod (2)).
25: This clearing allows each user to restrict the default access
26: to his files.
27: .PP
28: The value is initially 022 (write access for owner only).
29: The mask is inherited by child processes.
30: .SH "RETURN VALUE
31: The previous value of the file mode mask is returned by the call.
32: .SH SEE ALSO
33: chmod(2), mknod(2), open(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.