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