File: umask.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (130 lines) | stat: -rw-r--r-- 4,150 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 2006, 2008, Michael Kerrisk (mtk.manpages@gmail.com)
.\" (A few fragments remain from an earlier (1992) version written in
.\" 1992 by Drew Eckhardt <drew@cs.colorado.edu>.)
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified by Michael Haardt <michael@moria.de>
.\" Modified Sat Jul 24 12:51:53 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Tue Oct 22 22:39:04 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Thu May  1 06:05:54 UTC 1997 by Nicolas Lichtmaier
.\"  <nick@debian.com> with Lars Wirzenius <liw@iki.fi> suggestion
.\" 2006-05-13, mtk, substantial rewrite of description of 'mask'
.\" 2008-01-09, mtk, a few rewrites and additions.
.\"
.\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
.\"         all rights reserved.
.\" Translated 1997-06-26, SUTO Mitsuaki <suto@av.crl.sony.co.jp>
.\" Modified 1999-03-21, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2006-07-21, Akihiro MOTOKI, LDP v2.36
.\" Updated 2008-02-10, Akihiro MOTOKI, LDP v2.77
.\"
.TH UMASK 2 2008-01-09 "Linux" "Linux Programmer's Manual"
.SH ̾
umask \- ե⡼ɺޥꤹ
.SH 
.B #include <sys/types.h>
.br
.B #include <sys/stat.h>
.sp
.BI "mode_t umask(mode_t " mask );
.SH 
.BR umask ()
ϡƤӽФץΥե⡼ɺޥ (umask) 
.I mask
& 0777 ꤷ
.RI ( umask
ΥեĤбӥåȤΤߤѤ)
ѹΥޥ֤ͤ

umask ϡ
.BR open (2),
.BR mkdir (2)
եԤ¾Υƥॳǡ
.\" 㤨 mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
.\" System V IPC *get() ϳʤ
եǥ쥯ȥε (permission) 
뤿˻Ѥ롣
Ūˤ umask ꤵƤĤ
.BR open (2)

.BR mkdir (2)
 \fImode\fP ä롣

.I mask
˻ꤹΤ˻Ѥ٤ˤĤƤ
.BR stat (2)
Ƥ롣

ץ umask Τ褯ǥեͤ
.I S_IWGRP\ |\ S_IWOTH
(8ʤ 022) Ǥ롣
եݤ
.BR open (2)

.I mode

.nf

    S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
.fi
ꤹȤ褯륱Ǥϡ줿ե
.nf

    S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH

.fi
ȤĤĤȤˤʤ
(ʤʤ 0666 & ~022 = 0644Ĥޤ rw\-r\-\-r\-\-)
.SH ֤
Υƥॳɬ umask ֤ͤ
.SH 
SVr4, 4.3BSD, POSIX.1-2001.
.SH 
.BR fork (2)
Ǻ줿ҥץϡƥץ umask Ѿ롣
.BR execve (2)
ˤä umask ѹʤ

umask ϡΥץ POSIX IPC ֥
.RB ( mq_open (3),
.BR sem_open (3),
.BR shm_open (3))
 FIFO
.RB ( mkfifo (3))
Unix ɥᥤ󥽥å
.RB ( unix (7))
ꤵĤˤƶͿ롣
umask ϡΥץ
.RB ( msgget (2),
.BR semget (2),
.BR shmget (2)
Ȥä)  System V IPC ֥ȤꤵĤˤ
ƶͿʤ
.SH Ϣ
.BR chmod (2),
.BR mkdir (2),
.BR open (2),
.BR stat (2)
.\" FIXME . eventually: .BR acl (5)