File: path_resolution.7

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 (234 lines) | stat: -rw-r--r-- 9,032 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
.\" Copyright (C) 2003 Andries Brouwer (aeb@cwi.nl)
.\"
.\" 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.
.\"
.\" Japanese Version Copyright (c) 2005 Yuichi SATO
.\"         all rights reserved.
.\" Translated 2005-01-26, Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated and Modified 2005-10-27, Akihiro MOTOKI
.\" Updated and Modified 2005-11-04, Akihiro MOTOKI
.\"
.TH PATH_RESOLUTION 7 2004-06-21 "Linux" "Linux Programmer's Manual"
.SH ̾
Unix/Linux path resolution \- ե̾ǻȤե򸫤Ĥ
.SH 
Ĥ Unix/Linux ƥॳϡ
1 İʾΥե̾Ȥƻġ
ե̾ (ޤϥѥ̾) ϰʲΤ褦ˤƲ褵롣
.SS "ƥå 1: 򳫻Ϥ"
ѥ̾ '/' ʸǻϤޤäƤ硢
ǥ쥯ȥ긡γϸƤӽФΥץΥ롼ȥǥ쥯ȥˤʤ롣
(ץϥ롼ȥǥ쥯ȥƥץѾ롣
̾ϡ줬ե볬ؤΥ롼ȥǥ쥯ȥˤʤ롣
ץ
.BR chroot (2)
ƥॳȤä̤Υ롼ȥǥ쥯ȥ뤳ȤǤ롣
ξ硢Υץ
.B CLONE_NEWNS
ե饰ꤷ
.BR clone (2)
ƤӽФȤˤäƳϤ줿Υץλ¹ϡ
˥ץ饤١Ȥ֤̾Ǥ롣)
ѥ̾ '/' ʬϡΤ褦ˤư롣

ѥ̾ '/' ʸǻϤޤäƤʤ硢
ˤǥ쥯ȥ긡γϡ
ץθߤκ (working) ǥ쥯ȥȤʤ롣
(ƥץѾ롣

.BR chdir (2)
ƥॳȤȤѹǤ롣)

\&'/' ʸǻϤޤѥ̾Хѥ̾ȸƤФ졢
\&'/' ʸǻϤޤʤѥ̾Хѥ̾ȸƤФ롣
.SS "ƥå 2: ѥé"
ߤθǥ쥯ȥǥ쥯ȥ긡γȤ롣
ơѥ̾κǸι (component) ǤʤƹǤˤĤơ
ߤθǥ쥯ȥǸԤ
ǹǤ '/' Ƕڤ줿ʬʸǤ롣

ץߤθǥ쥯ȥθĤʤ硢
.B EACCES
顼֤ ("Permission denied")

ǤĤʤ硢
.B ENOENT
顼֤
("No such file or directory")

ǤϸĤäǥ쥯ȥǤ⥷ܥå󥯤Ǥʤ硢
.B ENOTDIR
顼֤ ("Not a directory")

ǤĤäơĥǥ쥯ȥǤ硢
ߤθǥ쥯ȥ򤽤Υǥ쥯ȥꤷ
ιǤ˰ư롣

ǤĤäơĥܥå (symlink) Ǥ硢
(ߤθǥ쥯ȥǥ쥯ȥ긡γȤ)
ǽˤΥܥå󥯤褹롣
̤ǥ쥯ȥǤʤ硢
.B ENOTDIR
顼֤롣
ܥå󥯤β褬ƥǥ쥯ȥ꤬֤줿硢
Υǥ쥯ȥ򸽺ߤθǥ쥯ȥȤꤷ
ιǤ˰ư롣
˺Ƶޤޤդ뤳ȡ
ͥ򥹥åСե
ӥ (denial of service) 뤿ᡢ
Ƶκοȥܥå󥯤é¤롣
ͤĶ
.B ELOOP
顼֤
("Too many levels of symbolic links")
.\"
.\" ߤΤȤ: ܥå󥯲ˤƵκο 5 Ǥ롣
.\" ܥå󥯤é 40 Ǥ롣
.\" _POSIX_SYMLOOP_MAX  8 Ǥ롣
.SS "ƥå 3: ǸΥȥ򸫤Ĥ"
ѥ̾κǸιǤθϡΥƥåפ
¾ƤιǤƱ褦˼¹Ԥ뤬2 Ĥΰ㤤롣
(i) ǸιǤϥǥ쥯ȥǤɬפʤ
(ѥ˴ؤ¤ϤɤǤ⹽ʤ \(em
Υƥॳ뤬׵᤹Τˤäơ
ǥ쥯ȥǤʤФʤʤ⤢뤷
ǥ쥯ȥʳǤʤФʤʤ⤢)
(ii) ǤĤʤ˥顼ˤɬפϤʤ \(em
ιǤǤ褤⤢롣
ǸΥȥξܺ٤ʰϡ
Υƥॳ man ڡƤ롣
.SS ".  .."
ȤơƤΥǥ쥯ȥϥȥ "."  ".." ġ
Ϥ줾졢Υǥ쥯ȥ꼫ȤȤοƥǥ쥯ȥ򻲾Ȥ롣

ѥǤϡΥȥ꤬ʪŪʥե륷ƥ
ºݤ¸ߤ뤫ݤ˴ؤ餺Ūʰ̣ĤȲꤹ롣

롼Ȥé뤳ȤϤǤʤ: "/.."  "/" ƱǤ롣
.SS "ޥȰ"
"mount dev path" ޥɤ¹Ԥ塢
ѥ̾ "path" ϥǥХ "dev" Υե륷ƥ೬ؤ
롼ȥǥ쥯ȥ򻲾Ȥ褦ˤʤꡢΰ֤򻲾Ȥʤ

ޥȤ줿ե륷ƥγ˽Ф뤳ȤǤ:
"path/.."  "dev" Υե륷ƥ೬ؤγǤ
"path" οƥǥ쥯ȥ򻲾Ȥ롣
.SS "Υå"
ѥ̾ '/' ǽäƤ硢
ƥå 2 ˤơˤ빽Ǥβˡ򼡤Τ褦˶:
ιǤ¸ߤʤФʤ餺ǥ쥯ȥȤƲ褵롣
¸ߤʤϡ '/' ̵뤵롣
(ޤƱͤˡ '/' ѥ̾ϡ
\&'.' ˲äѥ̾)
.SS "Ǹ夬ܥå󥯤ΤȤ"
ѥ̾κǸιǤܥå󥯤Ǥ硢
Ȥե򥷥ܥå󥯤Ȥ뤫
ƤˤĤƥѥ褷̤Ȥ뤫ϡ
ƥॳ˰¸롣
ȤСƥॳ
.BR lstat (2)
ϥܥå󥯤˺Ѥ롣

.BR stat (2)
ϥܥå󥯤ǻؤ줿ե˺Ѥ롣
.SS "Ĺ"
ѥ̾ˤϺĹ롣
ѥ̾ (ޤϥܥå󥯤褹Ȥ֥ѥ̾) 
Ĺ硢
.B ENAMETOOLONG
顼֤ ("File name too long")
.SS "Υѥ̾"
 Unix ǤϡΥѥ̾ϸߤΥǥ쥯ȥ򻲾ȤƤ
ǶᡢPOSIX Ǥ϶Υѥ̾褹٤ǤϤʤȤ꤬ʤ줿
ξ硢Linux 
.B ENOENT
֤
.SS ""
եεĥӥåȤϡ3 Ȥ 3 ӥåȤ鹽롣
.BR chmod (1)

.BR stat (2)
򻲾Ȥ뤳ȡ
ƤӽФΥץμ¸桼 ID եνͭ ID 硢
3 ĤΤǽΥ롼פȤ롣
եΥ롼 ID ƤӽФΥץμ¸롼 ID ޤ
.RB ( setgroups (2)
ꤵ) ƤӽФΥץ (supplementary) 롼 ID 
硢3 ĤΤ 2 ܤΥ롼פȤ롣
ɤˤƤϤޤʤ硢3 ܤΥ롼פȤ롣

3 ӥåȤȤ硢ǽΥӥåȤɤ߹ߵĤꤷ
2 ܤΥӥåȤϽ񤭹ߵĤꤹ롣
ޤ 3 ܤΥӥåȤϡ̾Υեξϼ¹ԵĤɽ
ǥ쥯ȥξϸĤɽ

Linux ϡĤΥåˤơ¸桼 ID ǤϤʤ fsuid Ȥ
̾ fsuid ϼ¸桼 ID fsuid ϥƥॳ
.BR setfsuid (2)
ѹ뤳ȤǤ롣

( "fsuid"  "file system user ID" ɽƤ롣
γǰϡ֥ץƱ¸桼 ID ĥץ
Ʊ˥ʥ뤳ȤǤפȤ桼 NFS Ф
ݤɬפǤä
ϺǤѤƤޤä
.BR setfsuid (2)
Ȥ٤ǤϤʤ

ƱͤˡLinux Ǥϼ¸롼 ID 
fsgid ("ե륷ƥࡦ롼ID") Ȥ
.BR setfsgid (2)
򻲾Ȥ뤳ȡ
.\" FIXME say something about filesystem mounted read-only ?
.SS "Ĥγǧ򥹥åפ: ѡ桼ȥѥӥƥ"
Ū Unix ƥǤϡѡ桼
.RI ( root ,
桼 ID 0) ˶ϤǤꡢե륢
Ĥˤ¤ƥåפ롣
.\" (but for exec at least one x bit must be set) -- AEB
.\" but there is variation across systems on this point: for
.\" example, HP-UX and Tru64 are as described by AEB.  However,
.\" on some implementations (e.g., Solaris, FreeBSD),
.\" access(X_OK) by superuser will report success, regardless
.\" of the file's execute permission bits. -- MTK (Oct 05)

Linux Ǥϡѡ桼¤ʣΥѥӥƥʬ䤵Ƥ
.RB ( capabilities (7)
)եεĤγǧˤϡ
.B CAP_DAC_OVERRIDE

.B CAP_DAC_READ_SEARCH
 2ĤΥѥӥƥط
(ץ fsuid  0 ξ硢ΥץϤΥѥӥƥ)

.B CAP_DAC_OVERRIDE
ѥӥƥƤεĥå񤭤롣
ºݤˤϡоݤȤʤե 3 Ĥμ¹ԵĥӥåȤΤ
ʤȤ 1 ĤꤵƤС¹ԤĤǤ롣

.B CAP_DAC_READ_SEARCH
ѥӥƥϡǥ쥯ȥФɤ߹ߤȸĤ
̾ΥեФɤ߹ߤĤ롣
.\" FIXME say something about immutable files
.\" FIXME say something about ACLs
.SH Ϣ
.BR capabilities (7),
.BR credentials (7)