【问题标题】:How to configure SVN access list for directory/repository?如何为目录/存储库配置 SVN 访问列表?
【发布时间】:2010-05-31 20:27:53
【问题描述】:

我有下一个在 Windows Server 2008 下运行 Apache 2.2 的 SVN 存储库结构:

http://example.com/svn/e:\svn(根)为目标

http://example.com/svn/dir/e:\svn\dir 为目标(具有多个存储库的某个目录)

http://example.com/svn/dir/repo/e:\svn\dir\repo(存储库本身)为目标

如何访问列表以便群组@foo 拥有rw 访问repo

我有下一个访问列表:

[groups]
@foo = user1, user2

[/]
* = r

[dir/repo:/]
@foo = rw

最后一个字符串在我尝试的任何组合中都不起作用

Apache conf 是下一个:

<Location /svn>
    SVNParentPath "E:\SVN"

    DAV svn
    SVNListParentPath on
    AuthType Basic
    AuthName "Subversion repositories"
    Require valid-user

    AuthUserFile svn-auth.txt
    AuthzSVNAccessFile svn-acl.txt
</Location>

<Location /svn/dir/>
    SVNParentPath "E:\SVN\Dir"

    DAV svn
    SVNListParentPath on
    AuthType Basic
    AuthName "Subversion repositories"
    Require valid-user

    AuthUserFile svn-auth.txt
    AuthzSVNAccessFile svn-acl.txt
</Location>

<Location /svn/dir2/>
    SVNParentPath "E:\SVN\Dir2"

    DAV svn
    SVNListParentPath on
    AuthType Basic
    AuthName "Subversion repositories"
    Require valid-user

    AuthUserFile svn-auth.txt
    AuthzSVNAccessFile svn-acl.txt
</Location>

【问题讨论】:

    标签: svn windows-server-2008 apache2


    【解决方案1】:

    如果您已将其配置为

    <Location /dir>
        SVNParentPath e:\svn\dir
        AuthzSVNAccessFile e:\accesslist.txt
    

    那么你可能只是想要

    [repo:/]
    

    因为访问列表将相对于 e:\svn\dir。如果没有,您能否为 e:\svn\dir 发布 sn-p?谢谢!

    【讨论】:

    • PS:[repo:/] 不起作用。也许我必须为根目录下的每个目录创建一个单独的访问列表文件? (我有多个&lt;Location&gt; 和不同的SVNParentPath
    • 谢谢 - 我觉得一切正常 :-/ 抱歉,我之前没有发现一件事:我认为这只是组中的“foo = user1, user2”而不是“@foo =”定义,或者至少我们只使用@作为目录权限行。我仍然认为它只是 [repo:/] 没有您的 <Location /svn/dir> 引用的 svn-acl.txt 中的目录。尽管。在我发布之前没有看到你的 PS - 我想那时不会。如果这不起作用,我没有想法,对不起:-/
    • 我将单独的访问列表文件设置为 Dir (svn-access-dir.txt),其中设置了相对规则并且有效,即[repo:/]。但这很有趣 - 是否可以为所有子目录创建一个文件?
    猜你喜欢
    • 1970-01-01
    • 2018-11-19
    • 2011-04-14
    • 2019-02-06
    • 1970-01-01
    • 1970-01-01
    • 2013-07-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多