1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
26 .\" all rights reserved.
27 .\" Translated 2006-10-14 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
29 .TH FCHMODAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
32 .\"O fchmodat \- change permissions of a file relative to a directory \
34 fchmodat \- ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤ˤ¢¤ë¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹¸¢¤òÊѹ¹¤¹¤ë
38 .\"O .B #include <fcntl.h> /* Definition of AT_* constants */
39 .B #include <fcntl.h> /* AT_* Äê¿ô¤ÎÄêµÁ */
40 .B #include <sys/stat.h>
42 .BI "int fchmodat(int " dirfd ", const char *" pathname ", mode_t " \
43 mode ", int " flags );
47 .\"O Feature Test Macro Requirements for glibc (see
48 .\"O .BR feature_test_macros (7)):
49 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
50 .RB ( feature_test_macros (7)
56 .\"O Since glibc 2.10: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
57 glibc 2.10 °Ê¹ß: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
59 .\"O Before glibc 2.10:
66 .\"O system call operates in exactly the same way as
68 .\"O except for the differences described in this manual page.
70 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë°ã¤¤¤¬¤¢¤ë°Ê³°¤Ï¡¢
72 ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
74 .\"O If the pathname given in
76 .\"O is relative, then it is interpreted relative to the directory
77 .\"O referred to by the file descriptor
79 .\"O (rather than relative to the current working directory of
80 .\"O the calling process, as is done by
82 .\"O for a relative pathname).
84 ¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
85 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
87 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
89 ¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥«¥ì¥ó¥È¥ï¡¼¥¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î
96 .\"O is the special value
100 .\"O is interpreted relative to the current working
101 .\"O directory of the calling process (like
104 ¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
112 ¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
113 ¥«¥ì¥ó¥È¥ï¡¼¥¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
117 .\"O is absolute, then
121 ¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
126 .\"O can either be 0, or include the following flag:
128 ¤Ï 0 ¤Þ¤¿¤Ï°Ê²¼¤Î¥Õ¥é¥°¤Ç¤¢¤ë¡£
130 .B AT_SYMLINK_NOFOLLOW
133 .\"O is a symbolic link, do not dereference it:
134 .\"O instead operate on the link itself.
136 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¾ì¹ç¤Ï¡¢¤½¤ì¤òé¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢
137 ¥ê¥ó¥¯¼«¿È¤ËÂФ·¤Æ (¥¢¥¯¥»¥¹¸¢¤ÎÊѹ¹¤Î) Áàºî¤ò¹Ô¤¦¡£
138 .\"O This flag is not currently implemented.
139 ¤³¤Î¥Õ¥é¥°¤Ï¸½ºß¤Î¤È¤³¤í¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
140 .\"O .SH "RETURN VALUE"
148 .\"O On error, \-1 is returned and
150 .\"O is set to indicate the error.
151 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
153 ¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
156 .\"O The same errors that occur for
158 .\"O can also occur for
159 .\"O .BR fchmodat ().
164 .\"O The following additional errors can occur for
165 .\"O .BR fchmodat ():
167 ¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
171 .\"O is not a valid file descriptor.
173 ¤¬Í¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
176 .\"O Invalid flag specified in
179 ¤ËÉÔÀµ¤Ê¥Õ¥é¥°Ãͤ¬»ØÄꤵ¤ì¤¿¡£
185 .\"O is a file descriptor referring to a file other than a directory.
189 ¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
194 .\"O .BR AT_SYMLINK_NOFOLLOW ,
195 .\"O which is not supported.
197 ¤Ë¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤ÃÍ
198 .B AT_SYMLINK_NOFOLLOW
204 .\"O was added to Linux in kernel 2.6.16.
206 ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
207 .\"O .SH "CONFORMING TO"
214 .\"O for an explanation of the need for
215 .\"O .BR fchmodat ().
217 ¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
224 .BR path_resolution (7),