注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 服务器监控策略浅谈
 帮助

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


2007-05-31 22:46:05
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://ronald.blog.51cto.com/140996/28732
在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"

本文出自 “我的影子站在岸边” 博客,请务必保留此出处http://ronald.blog.51cto.com/140996/28732





    文章评论
 
2007-06-02 22:48:04
嗯,收藏啦,版本管理的方案不错

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: