OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / acl / draft / man1 / setfacl.1
1 .\" Access Control Lists manual pages
2 .\"
3 .\" (C) 2000 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
4 .\"
5 .\" This manual page may used unter the terms of the GNU LGPL license, either
6 .\" version 2 of this license, or (at your option) any later version.
7 .\"
8 .\" Japanese Version Copyright (c) 2005 Yuichi SATO
9 .\"         all rights reserved.
10 .\" Translated Sun Jun 12 01:15:13 JST 2005
11 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
12 .\"
13 .TH SETFACL 1 "ACL File Utilities" "May 2000" "Access Control Lists"
14 .\"O .SH NAME
15 .SH 名前
16 .\"O setfacl \- set file access control lists
17 setfacl \- ファイルのアクセス制御リスト (access control list) を設定する
18 .\"O .SH SYNOPSIS
19 .SH 書式
20
21 .B setfacl
22 [\-bkndRLPvh] [{\-m|\-x} acl_spec] [{\-M|\-X} acl_file] file ...
23
24 .B setfacl
25 \-\-restore=file
26
27 .\"O .SH DESCRIPTION
28 .SH 説明
29 .\"O This utility sets Access Control Lists (ACLs) of files and directories.
30 .\"O On the command line, a sequence of commands is followed by a sequence of
31 .\"O files (which in turn can be followed by another sequence of commands, ...).
32 このユーティリティはファイルとディレクトリの
33 アクセス制御リスト (Access Control List, ACL) を設定する。
34 コマンドラインでは、一連のコマンドの後にファイル群を指定する
35 (さらに別の一連のコマンド、ファイル群、... を続けて指定することができる)。
36
37 .\"O The options
38 .\"O .I \-m,
39 .\"O and
40 .\"O .I \-x
41 .\"O expect an ACL on the command line. Multiple ACL entries are separated
42 .\"O by comma characters (`,'). The options
43 .\"O .I \-M,
44 .\"O and
45 .\"O .I \-X
46 .\"O read an ACL from a file or from standard input. The ACL entry format is described in Section
47 .\"O ACL ENTRIES.
48 オプション
49 .I \-m
50
51 .I \-x
52 は ACL がコマンドラインで指定されることを想定している。
53 複数の ACL エントリはコンマ文字 (`,') で区切られる。
54 オプション
55 .I \-M
56
57 .I \-X
58 は ACL をファイルまたは標準入力から読み込む。
59 ACL エントリの書式は、「ACL エントリ」のセクションで説明されている。
60
61 .\"O The
62 .\"O .IR "\-\-set" " and " "\-\-set-file"
63 .\"O options set the ACL of a file or a directory. The previous ACL is
64 .\"O replaced.
65 .\"O ACL entries for this operation must include permissions.
66 .IR "\-\-set" " と " "\-\-set-file"
67 オプションはファイルとディレクトリの ACL を設定する。
68 以前の ACL は置き換えられる。
69 この操作で指定される ACL エントリは、
70 許可 (permission) を含まなければならない。
71
72 .\"O The
73 .\"O .IR "\-m (\-\-modify)" " and " "\-M (\-\-modify-file)"
74 .\"O options modify the ACL of a file or directory.
75 .\"O ACL entries for this operation must include permissions.
76 .IR "\-m (\-\-modify)" " と " "\-M (\-\-modify-file)"
77 オプションはファイルとディレクトリの ACL を変更する。
78 この操作で指定される ACL エントリは、許可を含まなければならない。
79
80 .\"O The
81 .\"O .IR "\-x (\-\-remove)" " and " "\-X (\-\-remove-file)"
82 .\"O options remove ACL enries. Only
83 .\"O ACL entries without the
84 .\"O .I perms
85 .\"O field are accepted as parameters, unless POSIXLY_CORRECT is defined.
86 .IR "\-x (\-\-remove)" " と " "\-X (\-\-remove-file)"
87 オプションは ACL エントリを削除する。
88 POSIXLY_CORRECT が定義されていない場合は、
89 .I perms
90 フィールドを持たない ACL エントリだけが引き数として指定できる。
91
92 .\"O When reading from files using the 
93 .\"O .I \-M,
94 .\"O and
95 .\"O .IR \-X
96 .\"O options, setfacl accepts the output getfacl produces.
97 .I \-M
98
99 .I \-X
100 オプションで (ACL を) ファイルから読み込む場合、
101 setfacl は getfacl が生成した出力を受け付ける。
102 .\"O There is at most one ACL entry per line. After a Pound sign (`#'),
103 .\"O everything up to the end of the line is treated as a comment.
104 1 行には最大で 1 つの ACL エントリがある。
105 シャープ記号 (`#') の後から行末まではコメントとして扱われる。
106
107 .\"O If setfacl is used on a file system which does not support ACLs, setfacl
108 .\"O operates on the file mode permission bits. If the ACL does not fit completely
109 .\"O in the permission bits, setfacl modifies the file mode permission bits to reflect the ACL as closely as possible, writes an error message to standard error, and returns with an exit status greater than 0.
110 ACL をサポートしないファイルシステム上で setfacl を使用した場合、
111 setfacl はファイルモード許可ビットを操作する。
112 ACL が許可ビットと完全には合わない場合、
113 setfacl はファイルモード許可ビットを ACL に可能な限り近づけるように変更し、
114 標準エラー出力にエラーメッセージを書き出して、0 より大きい終了状態で返る。
115
116 .\"O .SS PERMISSIONS
117 .SS 許可
118 .\"O The file owner and processes capable of CAP_FOWNER are granted the right
119 .\"O to modify ACLs of a file. This is analogous to the permissions required
120 .\"O for accessing the file mode. (On current Linux systems, root is the only
121 .\"O user with the CAP_FOWNER capability.)
122 ケーパビリティ (capability) CAP_FOWNER を持つファイル所有者とプロセスは、
123 ファイルの ACL を変更する権限が付与されている。
124 これはファイルモードにアクセスするのに必要な許可と類似している
125 (現在の Linux システムでは、CAP_FOWNER ケーパビリティを持つユーザは
126 root のみである)。
127
128 .\"O .SS OPTIONS
129 .SS オプション
130 .TP 4
131 .I \-b, \-\-remove-all
132 .\"O Remove all extended ACL entries. The base ACL entries of the owner, group and others are retained.
133 全ての拡張 ACL エントリを削除する。
134 所有者・グループ・その他という基本 (base) ACL エントリは保存される。
135 .TP 4
136 .I \-k, \-\-remove-default
137 .\"O Remove the Default ACL. If no Default ACL exists, no warnings are issued.
138 デフォルト ACL を削除する。
139 デフォルト ACL が存在しない場合、警告は出されない。
140 .TP 4
141 .I \-n, \-\-no-mask
142 .\"O Do not recalculate the effective rights mask. The default behavior of
143 .\"O setfacl is to recalculate the ACL mask entry, unless a mask entry was explicitly given.
144 実効権 (effective right) マスクを再計算しない。
145 setfacl のデフォルト動作では、ACL マスクエントリが明示的に指定されない限り、
146 ACL マスクエントリを再計算する。
147 .\"O The mask entry is set to the union of all permissions of the owning group, and all named user and group entries. (These are exactly the entries affected by the mask entry).
148 マスクエントリは所有グループ・指名ユーザ (named user)・指名グループの
149 エントリの全ての許可を結合したものに設定される
150 (マスクエントリに影響を受けるエントリは、正にこれらである)。
151 .TP 4
152 .I \-\-mask
153 .\"O Do recalculate the effective rights mask, even if an ACL mask entry was explicitly given. (See the
154 .\"O .IR "\-n " option.)
155 ACL マスクエントリが明示的に指定されている場合でも、実効権マスクを再計算する
156 .RI ( \-n
157 オプションを参照)。
158 .TP 4
159 .I \-d, \-\-default
160 .\"O All operations apply to the Default ACL. Regular ACL entries in the
161 .\"O input set are promoted to Default ACL entries. Default ACL entries in
162 .\"O the input set are discarded. (A warning is issued if that happens).
163 全ての操作をデフォルト ACL に適用する。
164 入力セットに含まれる通常の ACL エントリを
165 デフォルト ACL エントリに昇格させる。
166 入力セットに含まれるデフォルト ACL エントリは破棄される
167 (これが起こった場合は警告を出す)。
168 .TP 4
169 .I \-\-restore=file
170 .\"O Restore a permission backup created by `getfacl \-R' or similar. All permissions
171 .\"O of a complete directory subtree are restored using this mechanism. If the input
172 .\"O contains owner comments or group comments, and setfacl is run by root, the
173 .\"O owner and owning group of all files are restored as well. This option cannot be mixed with other options except `\-\-test'.
174 `getfacl \-R' またはそれと同様なもので作成された
175 許可のバックアップで復旧する。
176 ディレクトリサブツリーの全ての許可が、この方法で復旧される。
177 入力に所有者コメントまたはグループコメントが含まれていて、
178 かつ setfacl が root によって実行されている場合、
179 全てのファイルの所有者と所有グループも復旧される。
180 この操作は `\-\-test' 以外のオプションと併用できない。
181 .TP 4
182 .I \-\-test
183 .\"O Test mode. Instead of changing the ACLs of any files, the resulting ACLs are listed.
184 テストモード。
185 ファイルの ACL を変更する代わりに、結果の ACL の一覧を表示する。
186 .TP 4
187 .I \-R, \-\-recursive
188 .\"O Apply operations to all files and directories recursively. This option cannot be mixed with `\-\-restore'.
189 全てのファイルとディレクトリに対して再帰的に操作を適用する。
190 このオプションは `\-\-restore' と併用できない。
191 .TP 4
192 .I \-L, \-\-logical
193 .\"O Logical walk, follow symbolic links. The default behavior is to follow symbolic link arguments, and to skip symbolic links encountered
194 .\"O in subdirectories. This option cannot be mixed with `\-\-restore'.
195 論理的に辿り、シンボリックリンクを辿る。
196 デフォルトの動作では、シンボリックリンク引き数を辿り、
197 サブディレクトリで見つかったシンボリックリンクはスキップする。
198 このオプションは `\-\-restore' と併用できない。
199 .TP 4
200 .I \-P, \-\-physical
201 .\"O Physical walk, skip all symbolic links. This also skips symbolic link arguments.
202 .\"O This option cannot be mixed with `\-\-restore'.
203 物理的に辿り、全てのシンボリックリンクをスキップする。
204 シンボリックリンク引き数もスキップする。
205 このオプションは `\-\-restore' と併用できない。
206 .TP 4
207 .I \-\-version
208 .\"O Print the version of setfacl and exit.
209 setfacl のバージョンを表示し、終了する。
210 .TP 4
211 .I \-\-help
212 .\"O Print help explaining the command line options.
213 コマンドラインオプションを説明するヘルプを表示する。
214 .TP 4
215 .I \-\-
216 .\"O End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash.
217 コマンドラインオプションの終わり。
218 残りの引き数は、たとえダッシュ文字で始まっていたとしても、
219 ファイル名として解釈される。
220 .TP 4
221 .I \-
222 .\"O If the file name parameter is a single dash, setfacl reads a list of files from standard input.
223 ファイル名引き数が 1 つのダッシュ文字である場合、
224 setfacl は標準入力からファイルのリストを読み込む。
225
226 .\"O .SS ACL ENTRIES
227 .SS ACL エントリ
228 .\"O The setfacl utility recognizes the following ACL entry formats (blanks
229 .\"O inserted for clarity):
230 setfacl ユーティリティは以下の ACL エントリ書式を認識する
231 (分かりやすいように空白を挿入してある):
232
233 .fam C
234 .TP
235 .RI "[d[efault]:] [u[ser]:]" "uid " [: perms ]
236 .fam T
237 .\"O Permissions of a named user. Permissions of the file owner if
238 .\"O .I uid
239 .\"O is empty.
240 指名ユーザの許可。
241 .I uid
242 が空の場合は、ファイル所有者の許可。
243 .fam C
244 .TP
245 .RI "[d[efault]:] g[roup]:" "gid " [: perms ]
246 .fam T
247 .\"O Permissions of a named group. Permissions of the owning group if
248 .\"O .I gid
249 .\"O is empty.
250 指名グループの許可。
251 .I gid
252 が空の場合は、所有者グループの許可。
253 .fam C
254 .TP
255 .RI "[d[efault]:] m[ask][:] [:" perms ]
256 .fam T
257 .\"O Effective rights mask
258 実効権マスク。
259 .fam C
260 .TP
261 .RI "[d[efault]:] o[ther][:] [:" perms ]
262 .fam T
263 .\"O Permissions of others.
264 その他の許可。
265 .PP
266 .\"O Whitespace between delimiter characters and non-delimiter characters is ignored.
267 区切り文字と区切り文字以外の間の空白は無視される。
268 .PP
269 .PP
270 .\"O Proper ACL entries including permissions are used in modify and set operations. (options
271 .\"O .IR \-m ", " \-M ", " \-\-set " and " \-\-set-file ).
272 許可を含む正式な ACL エントリは、修正と設定の操作
273 (オプション
274 .IR \-m ", " \-M ", " \-\-set ", " \-\-set-file )
275 で使用される。
276 .\"O Entries without the
277 .\"O .I perms
278 .\"O field are used for
279 .\"O .I deletion
280 .\"O of entries (options
281 .\"O .IR \-x " and " \-X ).
282 .I perms
283 フィールドのないエントリは、エントリの\fI削除\fR (オプション
284 .IR \-x " と " \-X )
285 で使用される。
286 .PP
287 .\"O For
288 .\"O .I uid
289 .\"O and
290 .\"O .I gid
291 .\"O you can specify either a name or a number.
292 .I uid
293
294 .I gid
295 には名前と数値のどちらも指定できる。
296 .PP
297 .\"O The
298 .\"O .I perms
299 .\"O field is a combination of characters that indicate the permissions: read
300 .\"O .IR (r) ,
301 .\"O write
302 .\"O .IR (w) ,
303 .\"O execute
304 .\"O .IR (x) ,
305 .\"O execute only if the file is a directory or already has execute permission
306 .\"O for some user
307 .\"O .IR (X) .
308 .I perms
309 フィールド許可を表す文字の組み合わせである。
310 読み込み
311 .IR (r) ,
312 書き込み
313 .IR (w) ,
314 実行
315 .I (x)
316 は、ファイルがディレクトリであるか何れかのユーザの実行許可
317 .I (X)
318 が既にある場合にのみ実行される。
319 .\"O Alternatively, the
320 .\"O .I perms
321 .\"O field can be an octal digit (0\-7).
322 文字の組合わせの代わりに、
323 .I perms
324 フィールドを 8 進数 (0\-7) にすることもできる。
325 .PP
326 .\"O .SS AUTOMATICALLY CREATED ENTRIES
327 .SS 自動的に作成されるエントリ
328 .\"O Initially, files and directories contain only the three base ACL entries
329 .\"O for the owner, the group, and others. There are some rules that
330 .\"O need to be satisfied in order for an ACL to be valid:
331 初期状態では、ファイルとディレクトリは所有者・グループ・その他という
332 3 つの基本 ACL エントリを持つ。
333 ACL が有効であるためには満たさなければならない、いくつかのルールがある。
334 .IP * 4
335 .\"O The three base entries cannot be removed. There must be exactly one
336 .\"O entry of each of these base entry types.
337 3 つの基本エントリは削除できない。
338 これらの基本エントリ型のそれぞれに対して、
339 必ず 1 つのエントリがなければならない。
340 .IP * 4
341 .\"O Whenever an ACL contains named user entries or named group objects,
342 .\"O it must also contain an effective rights mask.
343 ACL が指名ユーザエントリまたは指名グループオブジェクトを持つ場合、
344 実効権マスクも持たなければならない。
345 .IP * 4
346 .\"O Whenever an ACL contains any Default ACL entries, the three Default ACL
347 .\"O base entries (default owner, default group, and default others) must also exist.
348 ACL がデフォルト ACL エントリを持つ場合、
349 3 つのデフォルト ACL 基本エントリ (デフォルト所有者・
350 デフォルトグループ・デフォルトのその他) が存在しなければならない。
351 .IP * 4
352 .\"O Whenever a Default ACL contains named user entries or named group objects,
353 .\"O it must also contain a default effective rights mask.
354 デフォルト ACL が指名ユーザエントリまたは指名グループオブジェクトを持つ場合、
355 デフォルト実効権マスクも持たなければならない。
356 .PP
357 .\"O To help the user ensure these rules, setfacl creates entries from existing
358 .\"O entries under the following conditions:
359 ユーザがこれらのルールを確実に守るための助けとして、
360 setfacl は以下の条件で既存のエントリからエントリを作成する:
361 .IP * 4
362 .\"O If an ACL contains named user or named group entries, and
363 .\"O no mask entry exists, a mask entry containing the same permissions as
364 .\"O the group entry is created. Unless the
365 .\"O .I \-n
366 .\"O option is given, the permissions of the mask entry are further adjusted to include the union of all permissions affected by the mask entry. (See the
367 .\"O .I \-n
368 .\"O option description).
369 ACL が指名ユーザまたは指名グループのエントリを持ち、
370 かつマスクエントリが存在しない場合、
371 グループエントリと同じ許可を持つマスクエントリが作成される。
372 .I \-n
373 オプションが指定されない限り、マスクエントリの許可は、
374 そのマスクエントリの影響を受ける全ての許可を合わせたもの含めるように、
375 更に調整される
376 .RI ( \-n
377 オプションの説明を参照すること)。
378 .IP * 4
379 .\"O If a Default ACL entry is created, and the Default ACL contains no
380 .\"O owner, owning group, or others entry, a copy of the ACL owner, owning group, or others entry is added to the Default ACL.
381 デフォルト ACL エントリが作成され、
382 かつデフォルト ACL が所有者・所有グループ・その他のエントリを持たない場合、
383 ACL 所有者・所有グループ・その他のエントリのコピーが
384 デフォルト ACL に追加される。
385 .IP * 4
386 .\"O If a Default ACL contains named user entries or named group entries, and no mask entry exists, a mask entry containing the same permissions as the default Default ACL's group entry is added. Unless the
387 .\"O .I \-n
388 .\"O option is given, the permissions of the mask entry are further adjusted to inclu
389 .\"O de the union of all permissions affected by the mask entry. (See the
390 .\"O .I \-n
391 .\"O option description).
392 デフォルト ACL が指名ユーザまたは指名グループのエントリを持ち、
393 かつマスクエントリが存在する場合、
394 デフォルト ACL のグループエントリと同じ許可を持つマスクエントリが追加される。
395 .I \-n
396 オプションが指定されない限り、マスクエントリの許可は、
397 そのマスクエントリの影響を受ける全ての許可を合わせたもの含めるように、
398 更に調整される
399 .RI ( \-n
400 オプションの説明を参照すること)。
401 .PP
402 .\"O .SH EXAMPLES
403 .SH 例
404 .PP
405 .\"O Granting an additional user read access
406 追加のユーザの読み込みアクセスを許可する。
407 .RS
408 .fam C
409 setfacl \-m u:lisa:r file
410 .fam T
411 .RE
412 .PP
413 .\"O Revoking write access from all groups and all named users (using the effective rights mask)
414 全てのグループと全ての指名ユーザの書き込みアクセスを
415 (実効権マスクを使って) 取り消す。
416 .RS
417 .fam C
418 setfacl \-m m::rx file
419 .fam T
420 .RE
421 .PP
422 .\"O Removing a named group entry from a file's ACL
423 ファイルの ACL から指名グループエントリを削除する。
424 .RS
425 .fam C
426 setfacl \-x g:staff file
427 .fam T
428 .RE
429 .PP
430 .\"O Copying the ACL of one file to another
431 あるファイルの ACL を他にコピーする。
432 .RS
433 .fam C
434 getfacl file1 | setfacl \-\-set-file=\- file2
435 .fam T
436 .RE
437 .PP
438 .\"O Copying the access ACL into the Default ACL
439 アクセス ACL をデフォルト ACL にコピーする。
440 .RS
441 .fam C
442 getfacl \-\-access dir | setfacl \-d \-M\- dir
443 .fam T
444 .RE
445 .\"O .SH CONFORMANCE TO POSIX 1003.1e DRAFT STANDARD 17
446 .SH POSIX 1003.1e DRAFT STANDARD 17 への準拠
447 .\"O If the environment variable POSIXLY_CORRECT is defined, the default behavior of setfacl changes as follows: All non-standard options are disabled.
448 環境変数 POSIXLY_CORRECT が定義されている場合、
449 getfacl のデフォルトの動作は、以下のように変わる。
450 標準に準拠しない全てのオプションは無効にされる。
451 .\"O The ``default:'' prefix is disabled.
452 ``default:'' プレフィックスは無効にされる。
453 .\"O The
454 .\"O .IR \-x " and " \-X
455 .\"O options also accept permission fields (and ignore them). 
456 .IR \-x " と " \-X
457 オプションは許可フィールドを受け付ける (しかし、無視する)。
458 .\"O .SH AUTHOR
459 .SH 著者
460 Andreas Gruenbacher,
461 .RI < a.gruenbacher@bestbits.at >.
462
463 .\"O Please send your bug reports, suggested features and comments to the
464 .\"O above address.
465 バグ報告・提案したい機能・意見は上記のアドレスに送ってほしい。
466 .\"O .SH SEE ALSO
467 .SH 関連項目
468 .BR getfacl "(1), " chmod "(1), " umask "(1), " acl (5)