blob: 119fd71bf837df728a3ae369fa8f2329bd246d0c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
<!-- English Revision: 574882:1673563 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<modulesynopsis metafile="mod_authz_owner.xml.meta">
<name>mod_authz_owner</name>
<description>ファイルの所有者に基づいた承認</description>
<status>Extension</status>
<sourcefile>mod_authz_owner.c</sourcefile>
<identifier>authz_owner_module</identifier>
<compatibility>Apache 2.1 以降で使用可能</compatibility>
<summary>
<p>このモジュールはリクエストされたファイルのファイルシステムの
所有者やグループを HTTP 認証に使われたユーザ ID (ウェブユーザ ID) と
比較することでアクセスを承認します。提供されたユーザ名とパスワードは
<module>mod_auth_basic</module>
<module>mod_auth_digest</module> のような認証モジュールで既に
適切に検証されている必要があります。<module>mod_authz_owner</module>
は以下のように、<directive module="core"
>Require</directive> ディレクティブの <code>file-owner</code>
<code>file-group</code> という二つの引数を認識します:</p>
<dl>
<dt><code>file-owner</code></dt>
<dd>提供されたウェブユーザ名はリクエストされたファイルの所有者の
システムにおける名前と一致する必要があります。つまり、オペレーティング
システムがファイルは <code>jones</code> により所有されている
と言ったときは、ウェブからのアクセスに使われるユーザ名も
<code>jones</code> でなければなりません。</dd>
<dt><code>file-group</code></dt>
<dd>ファイルを所有するシステムのグループの名前が、例えば
<module>mod_authz_groupfile</module><module>mod_authz_dbm</module>
により提供されるグループデータベースに存在していて、
ウェブユーザ名がそのグループに属していなければなりません。
例えば、オペレーティングシステムがファイルは (システムの) グループ
<code>accounts</code> により所有されていると言ったときは、
<code>accounts</code> がグループデータベースに存在して、
リクエストに使用されたウェブユーザ名がそのグループに属している
必要があります。</dd>
</dl>
<note><title></title>
<p>ファイルシステムに実際には存在しないリソース
(<em>つまり</em> バーチャルなリソース) の承認に
<module>mod_authz_owner</module> が使用されたときは、
アクセスは拒否されます。</p>
<p>特に、<a
href="../content-negotiation.html#multiviews">コンテント
ネゴシエーションされた"MultiViews"</a> のリソースは
決して承認しません。</p>
</note>
</summary>
<seealso><directive module="mod_authz_core">Require</directive></seealso>
<section id="examples"><title>設定例</title>
<section id="examples.file-owner"><title>Require file-owner</title>
<p>複数ユーザのシステムで Apache ウェブサーバが実行されていて、
<code>~/public_html/private</code> に各ユーザがファイルを置いているとします。
<directive module="mod_authn_dbm">AuthDBMUserFile</directive>
データベースが一つだけあり、すべてのウェブユーザ名が列挙されており、
このユーザ名がサーバで実際にファイルを所有しているユーザ名と一致している場合、
次の節のような設定で、ユーザが自分自身のファイルにアクセスできるようになります。
<code>/home/smith/public_html/private</code> の中のファイルは、所有者が
<code>smith</code> の代わりに <code>jones</code> になっていない限り、
<code>jones</code> にはアクセスは許可されません。</p>
<example>
&lt;Directory /home/*/public_html/private&gt;<br />
<indent>
AuthType Basic<br />
AuthName MyPrivateFiles<br />
AuthBasicProvider dbm<br />
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
Require file-owner<br />
</indent>
&lt;/Directory&gt;
</example>
</section>
<section id="examples.file-group"><title>Require file-group</title>
<p>上記のようなシステムで、数人のユーザがプロジェクトのファイルを
<code>~/public_html/project-foo</code> で共有しているとします。
ファイルはシステムのグループ <code>foo</code> に所有されていて、
<directive module="mod_authz_dbm">AuthDBMGroupFile</directive>
データベースが一つだけあり、そこにすべてのウェブユーザ名と
グループのメンバが列挙されている、<em>つまり</em>、それらの
ユーザは少なくとも <code>foo</code> というグループに属している、とします。
<code>jones</code><code>smith</code> の二人共がグループ
<code>foo</code> のメンバである場合、どちらの人も両方の
<code>project-foo</code> にアクセスが許可されます。</p>
<example>
&lt;Directory /home/*/public_html/project-foo&gt;<br />
<indent>
AuthType Basic<br />
AuthName "Project Foo Files"<br />
AuthBasicProvider dbm<br />
<br />
# combined user/group database<br />
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all<br />
<br />
Satisfy All<br />
Require file-group<br />
</indent>
&lt;/Directory&gt;
</example>
</section>
</section>
</modulesynopsis>