在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"