在Subversion中只读用户

时间:2014-09-30 16:30:49

标签: apache svn

我正在测试SVN用户的只读访问权限:以下是我在apache2和svn repo conf中的配置:

但是我的测试用户具有读写访问权限,而我只想进行只读访问。

repo location
/svn/test/

file:/etc/apache2/conf.d/svn.conf

<location /repos>
   DAV svn 
   #svn path
   SVNParentPath /svn/
   AuthType Basic
   AuthName "Authorization Realm"
   #password file path
   AuthUserFile /etc/subversion/test.users
   Require valid-user
</location>

authz conf(只有一个条目) file:/ svn / test / conf / authz

[test:/svn/test/]
* = r

也尝试过:

[groups]
readonly = user1, user2

[/]
*=r
@readonly=r

还试过:以下     [组]     readonly = user1,user2

[10.29.3.238:80/repos/test]
*=r

1 个答案:

答案 0 :(得分:0)

AuthzSVNAccessFile /svn/test/conf/authz

  • 您上次的authz文件格式错误:路径部分必须的格式没有主机的URL或IP,只有[repository-name:/path/on/this/repo][/]是特例)。即在[test:/svn/test/]添加AuthzSVNAccessFile之后,您将存储库测试中的文件夹/ svn / test /定义为每个人的RO,第二次尝试过多:* = r将为每个人定义所有存储库RO,@readonly = r其他组的RO(属于&#34; Everybody&#34; *
  • 的一部分