我们在apache上为多个项目和业务文件托管一个svn存储库。一个客户端也可以访问多个程序员和一些项目文件夹。示例布局为:
svn/ourcompany/business
svn/ourcompany/projects
svn/ourcompany/projects/proj1
svn/ourcompany/projects/proj2
svn/ourcompany/projects/proj3
以前我们的svn.access文件如下所示:
[groups]
admin = jd
programmer = jd,pr1,pr2
[ourcompany:/]
@admin = rw
[ourcompany:/business]
@admin = rw
[ourcompany:/projects]
@admin = rw
@programmer = rw
[ourcompany:/projects/proj1]
client1a = rw
client1b = rw
webclient = rw
今天我们发现此设置导致我们公司的webclient1出现403错误:/ projects / proj1
经过一些研究,承包商建议添加
[groups]
admin = jd
programmer = jd,pr1,pr2
[ourcompany:/]
* = r
@admin = rw
[ourcompany:/business]
* =
@admin = rw
[ourcompany:/projects]
@admin = rw
@programmer = rw
[ourcompany:/projects/proj1]
client1a = rw
client1b = rw
webclient = rw
但现在这意味着我需要添加
*=
到项目文件夹中的每个项目???
有人可以就svn.accessfile中的权限如何在文件夹层次结构中工作提出建议吗?
下面的apache虚拟主机
<VirtualHost ipadress:80>
ServerName subversion.ourcompany.com
ServerAdmin webmaster@ourcompany.com
DocumentRoot /var/www/subversion.ourcompany.com
DavLockDB /var/lock/apache2/DavLock
<Location /svn>
DAV svn
SVNParentPath /var/svn
SVNListParentPath on
SVNAutoversioning on
SVNIndexXSLT "/repos-web/view/repos.xsl"
#ModMimeUsePathInfo on
AuthzSVNAccessFile /etc/apache2/svn.accessfile
AuthType Basic
AuthName "SVN"
AuthUserFile /etc/apache2/svn.passwd
Require valid-user
# compress as much as possible
SetOutputFilter DEFLATE
SetInputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</Location>
<IfModule mpm_itk_module>
AssignUserId www-data www-data
</IfModule>
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%) %s' deflate
CustomLog /var/log/apache2/svn-deflate.log deflate
CustomLog /var/log/apache2/svn-access.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
ErrorLog /var/log/apache2/svn-error.log
</VirtualHost>
我们想要实现的目标:
webclient只能访问我们的公司:/ projects / proj1并且对我们公司没有读取权限:/ projects后者可以通过将* =放入我们公司的每个子文件夹来实现:/ projects,但这不是实用的。< / p>
答案 0 :(得分:1)
我想首先提出以下建议:
我会更改/添加一些部分,以便完整的结果文件是:
[groups]
admin = jd
programmer = jd,pr1,pr2
gr_client1 = client1a,client1b,webclient1
[ourcompany:/]
* =
@programmer = r
@gr_client1 =
@admin = rw
[ourcompany:/projects]
@programmer = rw
[ourcompany:/projects/proj1]
@gr_client1 = rw
这表示以下
因此,您必须为每个新组添加一个额外的客户端组,在那里添加用户,并仅为其各个项目添加一个规则。
PS:在你的问题webclient1
中,但是在你提供的文件中,它只是webclient
。你想要哪一个?