OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man2 / umask.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 2006, 2008, Michael Kerrisk (mtk.manpages@gmail.com)
4 .\" (A few fragments remain from an earlier (1992) version written in
5 .\" 1992 by Drew Eckhardt <drew@cs.colorado.edu>.)
6 .\"
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\"
27 .\" Modified by Michael Haardt <michael@moria.de>
28 .\" Modified Sat Jul 24 12:51:53 1993 by Rik Faith <faith@cs.unc.edu>
29 .\" Modified Tue Oct 22 22:39:04 1996 by Eric S. Raymond <esr@thyrsus.com>
30 .\" Modified Thu May  1 06:05:54 UTC 1997 by Nicolas Lichtmaier
31 .\"  <nick@debian.com> with Lars Wirzenius <liw@iki.fi> suggestion
32 .\" 2006-05-13, mtk, substantial rewrite of description of 'mask'
33 .\" 2008-01-09, mtk, a few rewrites and additions.
34 .\"
35 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
36 .\"         all rights reserved.
37 .\" Translated 1997-06-26, SUTO Mitsuaki <suto@av.crl.sony.co.jp>
38 .\" Modified 1999-03-21, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
39 .\" Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
40 .\" Updated 2006-07-21, Akihiro MOTOKI, LDP v2.36
41 .\" Updated 2008-02-10, Akihiro MOTOKI, LDP v2.77
42 .\"
43 .TH UMASK 2 2008-01-09 "Linux" "Linux Programmer's Manual"
44 .SH Ì¾Á°
45 umask \- ¥Õ¥¡¥¤¥ë¥â¡¼¥ÉºîÀ®¥Þ¥¹¥¯¤òÀßÄꤹ¤ë
46 .SH ½ñ¼°
47 .B #include <sys/types.h>
48 .br
49 .B #include <sys/stat.h>
50 .sp
51 .BI "mode_t umask(mode_t " mask );
52 .SH ÀâÌÀ
53 .BR umask ()
54 ¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥Õ¥¡¥¤¥ë¥â¡¼¥ÉºîÀ®¥Þ¥¹¥¯ (umask) ¤ò
55 .I mask
56 & 0777 ¤ËÀßÄꤷ
57 .RI ( umask
58 ¤Î¥Õ¥¡¥¤¥ëµö²Ä¤ËÂбþ¤¹¤ë¥Ó¥Ã¥È¤Î¤ß¤ò»ÈÍѤ¹¤ë)¡¢
59 Êѹ¹Á°¤Î¥Þ¥¹¥¯ÃͤòÊÖ¤¹¡£
60
61 umask ¤Ï¡¢
62 .BR open (2),
63 .BR mkdir (2)
64 ¤ä¥Õ¥¡¥¤¥ëºîÀ®¤ò¹Ô¤¦¤½¤Î¾¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¡¢
65 .\" Î㤨¤Ð mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
66 .\" System V IPC *get() ¥³¡¼¥ë¤Ï³ºÅö¤·¤Ê¤¤¡£
67 ¿·¤·¤¯ºîÀ®¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤Îµö²Ä (permission) ¤ò
68 ½¤Àµ¤¹¤ë¤¿¤á¤Ë»ÈÍѤµ¤ì¤ë¡£
69 ¶ñÂÎŪ¤Ë¤Ï umask ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ëµö²Ä¤¬
70 .BR open (2)
71 ¤ä
72 .BR mkdir (2)
73 ¤Î \fImode\fP °ú¤­¿ô¤«¤é¼è¤ê¾Ã¤µ¤ì¤ë¡£
74
75 .I mask
76 ¤Ë»ØÄꤹ¤ë¤Î¤Ë»ÈÍѤ¹¤Ù¤­Äê¿ô¤Ë¤Ä¤¤¤Æ¤Ï
77 .BR stat (2)
78 ¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¡£
79
80 ¥×¥í¥»¥¹¤Î umask ¤Î¤è¤¯¤¢¤ë¥Ç¥Õ¥©¥ë¥ÈÃͤÏ
81 .I S_IWGRP\ |\ S_IWOTH
82 (8¿Ê¤Ç 022) ¤Ç¤¢¤ë¡£
83 ¿·¤·¤¤¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ëºÝ¤Ë
84 .BR open (2)
85 ¤Î
86 .I mode
87 °ú¤­¿ô¤Ë
88 .nf
89
90     S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
91 .fi
92 ¤ò»ØÄꤹ¤ë¤È¤¤¤¦¤è¤¯¤¢¤ë¥±¡¼¥¹¤Ç¤Ï¡¢ºîÀ®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ï
93 .nf
94
95     S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
96
97 .fi
98 ¤È¤¤¤¦µö²Ä¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ë
99 (¤Ê¤¼¤Ê¤é 0666 & ~022 = 0644¡¢¤Ä¤Þ¤ê rw\-r\-\-r\-\-)¡£
100 .SH ÊÖ¤êÃÍ
101 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ïɬ¤ºÀ®¸ù¤·¡¢°ÊÁ°¤Î umask ÃͤòÊÖ¤¹¡£
102 .SH ½àµò
103 SVr4, 4.3BSD, POSIX.1-2001.
104 .SH Ãí°Õ
105 .BR fork (2)
106 ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¡¢¿Æ¥×¥í¥»¥¹¤Î umask ¤ò·Ñ¾µ¤¹¤ë¡£
107 .BR execve (2)
108 ¤Ë¤è¤Ã¤Æ umask ¤ÏÊѹ¹¤µ¤ì¤Ê¤¤¡£
109
110 umask ¤ÎÀßÄê¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤¬À¸À®¤¹¤ë POSIX IPC ¥ª¥Ö¥¸¥§¥¯¥È
111 .RB ( mq_open (3),
112 .BR sem_open (3),
113 .BR shm_open (3))
114 ¤ä FIFO
115 .RB ( mkfifo (3))¡¢
116 Unix ¥É¥á¥¤¥ó¥½¥±¥Ã¥È
117 .RB ( unix (7))
118 ¤ËÀßÄꤵ¤ì¤ëµö²Ä¤Ë¤â±Æ¶Á¤òÍ¿¤¨¤ë¡£
119 °ìÊý¡¢umask ¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤¬
120 .RB ( msgget (2),
121 .BR semget (2),
122 .BR shmget (2)
123 ¤ò»È¤Ã¤Æ) À¸À®¤¹¤ë System V IPC ¥ª¥Ö¥¸¥§¥¯¥È¤ËÀßÄꤵ¤ì¤ëµö²Ä¤Ë¤Ï
124 ±Æ¶Á¤òÍ¿¤¨¤Ê¤¤¡£
125 .SH ´ØÏ¢¹àÌÜ
126 .BR chmod (2),
127 .BR mkdir (2),
128 .BR open (2),
129 .BR stat (2)
130 .\" FIXME . eventually: .BR acl (5)