基於Apache Http Server和SVN Server的版本管理方案(二)

在Location中還有一個 AuthzSVNAccessFile 參數,是可以用來控制svn-auth-file.ini
中的用戶read、write權限的,具體配置如下:
<Location /TestLib>
  DAV svn
  SVNPath F:/SVNROOT/TestLib
  AuthType Basic
  AuthName "Subversion repository"
  AuthzSVNAccessFile  F:/SVNROOT/TestLib/conf/svn-access-file.ini
  AuthUserFile F:/SVNROOT/TestLib/conf/svn-auth-file.ini
  Require valid-user
</Location>
注意其中的粗體部分,svn-access-file.ini就是我們要配置的權限控制文件,其內容舉例如下:
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to a
### single user, to a group of users defined in a special [groups]
### section, or to anyone using the '*' wildcard.  Each definition can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[groups]
 harry_and_sally = harry,sally
 
[/]
harry = rw
* =
 
[repository:F:/SVNROOT/TestLib]
@harry_and_sally = rw
* = r
其中:
1、harry_and_sally是自定義的組,包含兩個用戶harry和sally。
2、*表示全部用戶
3、注意每一行的前面不要有空格,否則會總是提示無權限的!
 
各位可根據上例自行配置自己的權限,多嘗試一下,對權限的任何更改,不需要重啓apache http server既可生效。
 
再說明一點,在apache的httpd.conf中以下一行前面不能有#:
LoadModule authz_svn_module "C:/Program Files/Subversion/bin/mod_authz_svn.so"
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章