1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
4 <!-- English Revision: 574882:1330911 (outdated) -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_authz_owner.xml.meta">
25 <name>mod_authz_owner</name>
26 <description>ファイルの所有者に基づいた承認</description>
27 <status>Extension</status>
28 <sourcefile>mod_authz_owner.c</sourcefile>
29 <identifier>authz_owner_module</identifier>
30 <compatibility>Apache 2.1 以降で使用可能</compatibility>
33 <p>このモジュールはリクエストされたファイルのファイルシステムの
34 所有者やグループを HTTP 認証に使われたユーザ ID (ウェブユーザ ID) と
35 比較することでアクセスを承認します。提供されたユーザ名とパスワードは
36 <module>mod_auth_basic</module> や
37 <module>mod_auth_digest</module> のような認証モジュールで既に
38 適切に検証されている必要があります。<module>mod_authz_owner</module>
39 は以下のように、<directive module="core"
40 >Require</directive> ディレクティブの <code>file-owner</code> と
41 <code>file-group</code> という二つの引数を認識します:</p>
44 <dt><code>file-owner</code></dt>
45 <dd>提供されたウェブユーザ名はリクエストされたファイルの所有者の
46 システムにおける名前と一致する必要があります。つまり、オペレーティング
47 システムがファイルは <code>jones</code> により所有されている
48 と言ったときは、ウェブからのアクセスに使われるユーザ名も
49 <code>jones</code> でなければなりません。</dd>
51 <dt><code>file-group</code></dt>
52 <dd>ファイルを所有するシステムのグループの名前が、例えば
53 <module>mod_authz_groupfile</module> や <module>mod_authz_dbm</module>
54 により提供されるグループデータベースに存在していて、
55 ウェブユーザ名がそのグループに属していなければなりません。
56 例えば、オペレーティングシステムがファイルは (システムの) グループ
57 <code>accounts</code> により所有されていると言ったときは、
58 <code>accounts</code> がグループデータベースに存在して、
59 リクエストに使用されたウェブユーザ名がそのグループに属している
63 <note><title>注</title>
64 <p>ファイルシステムに実際には存在しないリソース
65 (<em>つまり</em> バーチャルなリソース) の承認に
66 <module>mod_authz_owner</module> が使用されたときは、
70 href="../content-negotiation.html#multiviews">コンテント
71 ネゴシエーションされた"MultiViews"</a> のリソースは
75 <seealso><directive module="mod_authz_core">Require</directive></seealso>
77 <section id="examples"><title>設定例</title>
79 <section id="examples.file-owner"><title>Require file-owner</title>
80 <p>複数ユーザのシステムで Apache ウェブサーバが実行されていて、
81 <code>~/public_html/private</code> に各ユーザがファイルを置いているとします。
82 <directive module="mod_authn_dbm">AuthDBMUserFile</directive>
83 データベースが一つだけあり、すべてのウェブユーザ名が列挙されており、
84 このユーザ名がサーバで実際にファイルを所有しているユーザ名と一致している場合、
85 次の節のような設定で、ユーザが自分自身のファイルにアクセスできるようになります。
86 <code>/home/smith/public_html/private</code> の中のファイルは、所有者が
87 <code>smith</code> の代わりに <code>jones</code> になっていない限り、
88 <code>jones</code> にはアクセスは許可されません。</p>
91 <Directory /home/*/public_html/private><br />
94 AuthName MyPrivateFiles<br />
95 AuthBasicProvider dbm<br />
96 AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
97 Require file-owner<br />
103 <section id="examples.file-group"><title>Require file-group</title>
104 <p>上記のようなシステムで、数人のユーザがプロジェクトのファイルを
105 <code>~/public_html/project-foo</code> で共有しているとします。
106 ファイルはシステムのグループ <code>foo</code> に所有されていて、
107 <directive module="mod_authz_dbm">AuthDBMGroupFile</directive>
108 データベースが一つだけあり、そこにすべてのウェブユーザ名と
109 グループのメンバが列挙されている、<em>つまり</em>、それらの
110 ユーザは少なくとも <code>foo</code> というグループに属している、とします。
111 <code>jones</code> と<code>smith</code> の二人共がグループ
112 <code>foo</code> のメンバである場合、どちらの人も両方の
113 <code>project-foo</code> にアクセスが許可されます。</p>
116 <Directory /home/*/public_html/project-foo><br />
119 AuthName "Project Foo Files"<br />
120 AuthBasicProvider dbm<br />
122 # combined user/group database<br />
123 AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
124 AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all<br />
127 Require file-group<br />