<-
Apache > HTTP Server > Documentation > Version 2.2 > 모듈

Please note

This document refers to a legacy release (2.2) of Apache httpd. The active release (2.4) is documented here. If you have not already upgraded, please follow this link for more information.

You may follow this link to go to the current version of this document.

아파치 모듈 mod_authz_owner

가능한 언어:  en  |  ja  |  ko 

설명:파일 소유자를 이용한 권한부여
상태:Extension
모듈명:authz_owner_module
소스파일:mod_authz_owner.c
지원:아파치 2.1 이후부터

요약

이 모듈은 HTTP 인증에 사용한 사용자 아이디(웹 사용자 아이디)를 요청한 파일의 파일시스템 소유자/그룹과 비교하여 파일의 접근권한을 부여한다. 여기서 사용자명과 암호는 이미 mod_auth_basic이나 mod_auth_digest 같은 인증모듈의 확인을 거쳤다. mod_authz_ownerRequire 지시어의 다음 두 아규먼트, file-ownerfile-group을 처리한다:

file-owner
웹 사용자명이 요청한 파일 소유자의 시스템 이름과 같아야 한다. 즉, 운영체제가 요청한 파일의 소유자가 jones라면, 웹을 통해 파일에 접근하는 사용자도 마찬가지로 jones이어야 한다.
file-group
파일을 소유한 시스템 그룹명이 mod_authz_groupfile이나 mod_authz_dbm과 같은 그룹 데이터베이스에 있고, 웹 사용자명이 해당 그룹에 속해야 한다. 예를 들어, 운영체제가 요청한 파일을 accounts (시스템) 그룹이 소유하고 있다면, 그룹 데이터베이스에 accounts라는 그룹이 있고 요청에 사용한 웹 사용자명이 그 그룹에 속해야 한다.

주의

mod_authz_owner가 실제로 파일시스템에 있지 않는 자원을 (즉, 가상 자원) 권한부여한다면, 접근을 거부한다.

특히 내용협상한 "MultiViews" 자원을 권한부여하지 않는다.

주제

지시어들

참고

top

설정 예제

Require file-owner

아파치 웹서버를 운영하는 다중사용자 시스템에서 각 사용자가 ~/public_html/private에 자신의 파일을 저장한다고 가정하자. 모든 웹 사용자명을 저장하는 AuthDBMUserFile 데이터베이스가 있고, 여기에 저장된 사용자명은 서버에서 실제 파일을 소유하는 시스템 사용자명과 동일하다. 이 경우 아래 설정은 파일 소유자에게만 접근을 허용한다. 사용자 jones는 파일을 jones가 아닌 smith가 소유하고 있는 한 /home/smith/public_html/private에 있는 파일에 접근할 수 없다.

<Directory /home/*/public_html/private>
AuthType Basic
AuthName MyPrivateFiles
AuthBasicProvider dbm
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
Satisfy All
Require file-owner
</Directory>

Require file-group

위와 상황이 비슷하지만 여러명이 ~/public_html/project-foo에 프로젝트 파일을 공유한다고 가정하자. 파일들은 시스템 그룹 foo가 소유하며, 모든 웹 사용자명과 사용자 그룹을 기록하는 AuthDBMGroupFile 데이터베이스가 있다. 즉, 최소한 foo라는 그룹에 구성원이 있다. jonessmith가 모두 그룹 foo의 구성원이라면, 둘 모두 project-foo 디렉토리에 접근할 수 있다.

<Directory /home/*/public_html/project-foo>
AuthType Basic
AuthName "Project Foo Files"
AuthBasicProvider dbm

# combined user/group database
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all

Satisfy All
Require file-group
</Directory>

top

AuthzOwnerAuthoritative 지시어

설명:권한부여를 저수준 모듈로 넘겨줄지 여부
문법:AuthzOwnerAuthoritative On|Off
기본값:AuthzOwnerAuthoritative On
사용장소:directory, .htaccess
Override 옵션:AuthConfig
상태:Extension
모듈:mod_authz_owner

AuthzOwnerAuthoritative 지시어를 직접 Off로 설정하면 다음과 같은 경우 사용자 권한부여를 (modules.c 파일에서 정의한) 저수준 모듈로 넘겨준다.

또, 값을 Off로 설정하면 file-ownerfile-group을 결합하여, 둘 중 하나만 만족해도 접근을 허가한다.

기본적으로 제어를 넘기지않고, 모르는 그룹의 경우 인증 필요 응답을 한다. 이 지시어를 Off로 설정하지않으면 시스템이 안전하게 유지되며, NCSA 웹서버와 같이 동작한다.

가능한 언어:  en  |  ja  |  ko 

top

Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
Comments are disabled for this page at the moment.