OSDN Git Service

Update translations: chroot, csplit, dd, du, pwd
[linuxjm/coreutils.git] / help2man.ja / chmod.x
1 '\" Copyright (C) 1998-2016 Free Software Foundation, Inc.
2 '\"
3 '\" This is free software.  You may redistribute copies of it under the terms
4 '\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
5 '\" There is NO WARRANTY, to the extent permitted by law.
6 [名前]
7 .\"O chmod \- change file mode bits
8 chmod \- ファイルのモードビットを変更する
9 [説明]
10 .\"O This manual page
11 .\"O documents the GNU version of
12 .\"O .BR chmod .
13 .\"O .B chmod
14 .\"O changes the file mode bits of each given file according to
15 .\"O .IR mode ,
16 .\"O which can be either a symbolic representation of changes to make, or
17 .\"O an octal number representing the bit pattern for the new mode bits.
18 このマニュアルページでは GNU バージョンの \fBchmod\fP について説明しています。
19 \fBchmod\fP は指定されたファイルのモードビット (mode bits) を
20 \fImode\fP に基いて変更します。
21 \fImode\fP は、変更内容の記号表現 (記号モード)か、新しく設定するモードビットの
22 ビットパターンを表す 8 進数 (数値モード) のどちらかで指定します。
23 .PP
24 .\"O The format of a symbolic mode is [\c
25 .\"O \fBugoa\fP.\|.\|.][[\fB-+=\fP][\fIperms\fP.\|.\|.].\|.\|.],
26 .\"O where
27 .\"O .I "perms"
28 .\"O is either zero or more letters from the set
29 .\"O \fBrwxXst\fP, or a single letter from the set \fBugo\fP.
30 .\"O Multiple symbolic
31 .\"O modes can be given, separated by commas.
32 記号モードの書式は
33 [\fBugoa\fP.\|.\|.][[\fB-+=\fP][\fIperms\fP.\|.\|.].\|.\|.] です。
34 \fIperms\fP には、\fBrwxXst\fP のうち 0 個以上の文字か、
35 \fBugo\fP のいずれか 1 文字を指定します。
36 コンマで区切って、複数の記号表現を指定することができます。
37 .PP
38 .\"O A combination of the letters \fBugoa\fP controls which users' access
39 .\"O to the file will be changed: the user who owns it (\fBu\fP), other
40 .\"O users in the file's group (\fBg\fP), other users not in the file's
41 .\"O group (\fBo\fP), or all users (\fBa\fP).  If none of these are given,
42 .\"O the effect is as if (\fBa\fP) were
43 .\"O given, but bits that are set in the umask are not affected.
44 \fBugoa\fP の組み合わせで、そのファイルに対するユーザのアクセス権限を制御します。
45 それぞれ、ファイルの所有者のユーザ (\fBu\fP)、ファイルのグループに属する
46 所有者以外のユーザ (\fBg\fP)、ファイルのグループに属さない他のユーザ (\fBo\fP)、
47 全てのユーザ (\fBa\fP) を意味します。
48 \fBugoa\fP のどれも指定されなかった場合、(\fBa\fP) が指定されたのと同じ効果を
49 持ちますが、umask でセットされているビットは変更されません。
50 .PP
51 .\"O The operator \fB+\fP causes the selected file mode bits to be added to
52 .\"O the existing file mode bits of each file; \fB-\fP causes them to be
53 .\"O removed; and \fB=\fP causes them to be added and causes unmentioned
54 .\"O bits to be removed except that a directory's unmentioned set user and
55 .\"O group ID bits are not affected.
56 \fB+\fP 演算子は、各ファイルの現在のファイルモードビットに
57 指定されたファイルモードビットを追加します。
58 \fB\-\fP を指定すると、指定されたファイルモードビットが削除されます。
59 \fB=\fP を指定すると、指定されたファイルモードビットが追加され、
60 指定されていないビットが削除されます。
61 ただし、指定されていないビットのうち、ディレクトリの set\-user\-ID と
62 set\-group\-ID は影響を受けません。
63 .PP
64 .\"O The letters \fBrwxXst\fP select file mode bits for the affected users:
65 .\"O read (\fBr\fP), write (\fBw\fP), execute (or search for directories)
66 .\"O (\fBx\fP), execute/search only if the file is a directory or already
67 .\"O has execute permission for some user (\fBX\fP), set user or group ID
68 .\"O on execution (\fBs\fP), restricted deletion flag or sticky bit
69 .\"O (\fBt\fP).  Instead of one or more of these letters, you can specify
70 .\"O exactly one of the letters \fBugo\fP: the permissions granted to the
71 .\"O user who owns the file (\fBu\fP), the permissions granted to other
72 .\"O users who are members of the file's group (\fBg\fP),
73 .\"O and the permissions granted to users that are in neither of the two preceding
74 .\"O categories (\fBo\fP).
75 文字 \fBrwxXst\fP で設定対象のユーザのファイルモードビットを選択します:
76 読み出し許可 (\fBr\fP)、書き込み許可 (\fBw\fP)、
77 実行許可 (もしくはディレクトリの検索許可) (\fBx\fP)、
78 ファイルがディレクトリの場合もしくはファイルが
79 実行許可/検索許可 (ただし、ファイルがディレクトリの場合か、
80 あるユーザに対してすでに実行許可がある場合のみ) (\fBX\fP)、
81 実行時にユーザ ID もしくはグループ ID を設定する (\fBs\fP)、
82 削除制限 (restricted deletion) フラグもしくはスティッキービット (\fBt\fP)。
83 これらの文字を一つ以上指定する代わりに、
84 文字 \fBugo\fP のいずれか一つだけを指定することもできます:
85 ファイルを所有するユーザに付与されたアクセス許可 (\fBu\fP)、
86 ファイルのグループの所有者以外のメンバーに付与されたアクセス許可 (\fBg\fP)、
87 前記のどちらでもないユーザに付与されたアクセス許可 (\fBo\fP)。
88 .PP
89 .\"O A numeric mode is from one to four octal digits (0\-7), derived by
90 .\"O adding up the bits with values 4, 2, and 1.  Omitted digits are
91 .\"O assumed to be leading zeros.
92 .\"O The first digit selects the set user ID (4) and set group ID (2) and
93 .\"O restricted deletion or sticky (1) attributes.  The second digit
94 .\"O selects permissions for the user who owns the file: read (4), write (2),
95 .\"O and execute (1); the third selects permissions for other users in the
96 .\"O file's group, with the same values; and the fourth for other users not
97 .\"O in the file's group, with the same values.
98 数値モードでは 1 桁から 4 桁の 8 進数 (0\-7) で指定します。
99 その値は、ビットを値 4, 2, 1 に対応させたものを加算することで得られます。
100 省略された桁は先頭にある  0 とみなされます。
101 1 桁目では、set\-user\-ID (4)、set\-group\-ID (2)、削除制限/スティッキー (1)
102 といった属性を指定します。
103 2 桁目では、ファイルを所有するユーザに対するアクセス許可を指定します:
104 読み出し許可 (4)、書き込み許可 (2)、実行許可 (1)。
105 3 桁目ではファイルのグループの所有者以外のメンバーに対するアクセス許可を
106 指定します: 値は 2 桁目と同じ。
107 4 桁目ではファイルのグループに属さないユーザに対するアクセス許可を
108 指定します: 値は 2 桁目と同じ。
109 .PP
110 .\"O .B chmod
111 .\"O never changes the permissions of symbolic links; the
112 .\"O .B chmod
113 .\"O system call cannot change their permissions.  This is not a problem
114 .\"O since the permissions of symbolic links are never used.
115 .\"O However, for each symbolic link listed on the command line,
116 .\"O .B chmod
117 .\"O changes the permissions of the pointed-to file.
118 .\"O In contrast,
119 .\"O .B chmod
120 .\"O ignores symbolic links encountered during recursive directory
121 .\"O traversals.
122 \fBchmod\fP はシンボリックリンクのアクセス許可を変更することはありません。
123 \fBchmod\fP システムコールがシンボリックリンクのアクセス許可を変更できないからです。
124 シンボリックリンクのアクセス許可が使われることは決してないため、
125 これは問題にはなりません。
126 しかし、\fBchmod\fP は、コマンドラインで列挙されたシンボリックリンク
127 それぞれについて、シンボリックリンクが指しているファイルのアクセス許可を
128 変更します。その一方で、\fBchmod\fP は再帰的にディレクトリを辿っている途中で
129 見つけたシンボリックリンクは無視します。
130 .\"O .SH "SETUID AND SETGID BITS"
131 .SH "SETUID ビットと SETGID ビット"
132 .\"O .B chmod
133 .\"O clears the set-group-ID bit of a
134 .\"O regular file if the file's group ID does not match the user's
135 .\"O effective group ID or one of the user's supplementary group IDs,
136 .\"O unless the user has appropriate privileges.  Additional restrictions
137 .\"O may cause the set-user-ID and set-group-ID bits of
138 .\"O .I MODE
139 .\"O or
140 .\"O .I RFILE
141 .\"O to be ignored.  This behavior depends on the policy and
142 .\"O functionality of the underlying
143 .\"O .B chmod
144 .\"O system call.  When in
145 .\"O doubt, check the underlying system behavior.
146 \fBchmod\fP は、ファイルのグループ ID がユーザの実効グループ ID とも
147 ユーザの追加グループ ID とも一致せず、
148 ユーザが適切な特権を持っていない場合は、
149 通常のファイルの set\-group\-ID ビットをクリアします。
150 他にも追加の制限があり、\fIMODE\fP や \fIRFILE\fP の set\-user\-ID ビットや
151 set\-group\-ID ビットが無視される場合があります。どのような動作になるかは
152 裏で呼び出される \fBchmod\fP システムコールのポリシーや機能に依存します。
153 疑わしい点がある場合は、動作しているシステムの動作を確認して下さい。
154 .PP
155 .\"O .B chmod
156 .\"O preserves a directory's set-user-ID and set-group-ID bits unless you
157 .\"O explicitly specify otherwise.  You can set or clear the bits with
158 .\"O symbolic modes like
159 .\"O .B u+s
160 .\"O and
161 .\"O .BR g\-s ,
162 .\"O and you can set (but not clear) the bits with a numeric mode.
163 \fBchmod\fP は、明示的に指定した場合を除き、ディレクトリの set\-user\-ID ビットと
164 set\-group\-ID ビットを保持します。
165 これらのビットの設定や解除を行うには、
166 記号モードで \fBu+s\fP and \fBg\-s\fP のように指定します。
167 また、数値モードで対応するビットを指定することでビットの設定ができます
168 (解除はできません)。
169 .\"O .SH "RESTRICTED DELETION FLAG OR STICKY BIT"
170 .SH 削除制限フラグとスティッキービット
171 .\"O The restricted deletion flag or sticky bit is a single bit, whose
172 .\"O interpretation depends on the file type.  For directories, it prevents
173 .\"O unprivileged users from removing or renaming a file in the directory
174 .\"O unless they own the file or the directory; this is called the
175 .\"O .I "restricted deletion flag"
176 .\"O for the directory, and is commonly found on world-writable directories
177 .\"O like \fB/tmp\fP.  For regular files on some older systems, the bit
178 .\"O saves the program's text image on the swap device so it will load more
179 .\"O quickly when run; this is called the
180 .\"O .IR "sticky bit" .
181 削除制限フラグ (restricted deletion flag) とスティッキービット (sticky bit) は
182 1 ビットの情報で、ファイル種別によりその意味が変わります。
183 ディレクトリの場合、このビットがセットされていると、
184 非特権ユーザは、自分が所有者のファイルやディレクトリ以外は
185 そのディレクトリにあるファイルの削除や名前変更ができなくなります。
186 この機能はディレクトリの \fB削除制限フラグ\fP と呼ばれ、
187 \fB/tmp\fP などの誰でも書き込みできるディレクトリでは一般的に使われています。
188 いくつかの古いシステムでは、通常のファイルでこのビットが設定されている場合、
189 そのプログラムのテキストイメージがスワップデバイス上に保持され、
190 実行時により早くファイルがロードできるようになります。
191 この機能は \fBスティッキービット\fP と呼ばれます。
192 .\"O .SH OPTIONS
193 .SH オプション
194 [関連項目]
195 chmod(2)