1 .\" Hey Emacs! This file is -*- nroff -*- source.
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>.)
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.
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.
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
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
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.
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
43 .TH UMASK 2 2008-01-09 "Linux" "Linux Programmer's Manual"
45 umask \- ¥Õ¥¡¥¤¥ë¥â¡¼¥ÉºîÀ®¥Þ¥¹¥¯¤òÀßÄꤹ¤ë
47 .B #include <sys/types.h>
49 .B #include <sys/stat.h>
51 .BI "mode_t umask(mode_t " mask );
54 ¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥Õ¥¡¥¤¥ë¥â¡¼¥ÉºîÀ®¥Þ¥¹¥¯ (umask) ¤ò
58 ¤Î¥Õ¥¡¥¤¥ëµö²Ä¤ËÂбþ¤¹¤ë¥Ó¥Ã¥È¤Î¤ß¤ò»ÈÍѤ¹¤ë)¡¢
59 Êѹ¹Á°¤Î¥Þ¥¹¥¯ÃͤòÊÖ¤¹¡£
64 ¤ä¥Õ¥¡¥¤¥ëºîÀ®¤ò¹Ô¤¦¤½¤Î¾¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¡¢
65 .\" Î㤨¤Ð mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
66 .\" System V IPC *get() ¥³¡¼¥ë¤Ï³ºÅö¤·¤Ê¤¤¡£
67 ¿·¤·¤¯ºîÀ®¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤ä¥Ç¥£¥ì¥¯¥È¥ê¤Îµö²Ä (permission) ¤ò
68 ½¤Àµ¤¹¤ë¤¿¤á¤Ë»ÈÍѤµ¤ì¤ë¡£
69 ¶ñÂÎŪ¤Ë¤Ï umask ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ëµö²Ä¤¬
73 ¤Î \fImode\fP °ú¤¿ô¤«¤é¼è¤ê¾Ã¤µ¤ì¤ë¡£
76 ¤Ë»ØÄꤹ¤ë¤Î¤Ë»ÈÍѤ¹¤Ù¤Äê¿ô¤Ë¤Ä¤¤¤Æ¤Ï
80 ¥×¥í¥»¥¹¤Î umask ¤Î¤è¤¯¤¢¤ë¥Ç¥Õ¥©¥ë¥ÈÃͤÏ
81 .I S_IWGRP\ |\ S_IWOTH
83 ¿·¤·¤¤¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ëºÝ¤Ë
90 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH
92 ¤ò»ØÄꤹ¤ë¤È¤¤¤¦¤è¤¯¤¢¤ë¥±¡¼¥¹¤Ç¤Ï¡¢ºîÀ®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ï
95 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
98 ¤È¤¤¤¦µö²Ä¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ë
99 (¤Ê¤¼¤Ê¤é 0666 & ~022 = 0644¡¢¤Ä¤Þ¤ê rw\-r\-\-r\-\-)¡£
101 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ïɬ¤ºÀ®¸ù¤·¡¢°ÊÁ°¤Î umask ÃͤòÊÖ¤¹¡£
103 SVr4, 4.3BSD, POSIX.1-2001.
106 ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¡¢¿Æ¥×¥í¥»¥¹¤Î umask ¤ò·Ñ¾µ¤¹¤ë¡£
108 ¤Ë¤è¤Ã¤Æ umask ¤ÏÊѹ¹¤µ¤ì¤Ê¤¤¡£
110 umask ¤ÎÀßÄê¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤¬À¸À®¤¹¤ë POSIX IPC ¥ª¥Ö¥¸¥§¥¯¥È
116 Unix ¥É¥á¥¤¥ó¥½¥±¥Ã¥È
118 ¤ËÀßÄꤵ¤ì¤ëµö²Ä¤Ë¤â±Æ¶Á¤òÍ¿¤¨¤ë¡£
119 °ìÊý¡¢umask ¤Ï¡¢¤½¤Î¥×¥í¥»¥¹¤¬
123 ¤ò»È¤Ã¤Æ) À¸À®¤¹¤ë System V IPC ¥ª¥Ö¥¸¥§¥¯¥È¤ËÀßÄꤵ¤ì¤ëµö²Ä¤Ë¤Ï
130 .\" FIXME . eventually: .BR acl (5)