views:

168

answers:

1

I have next SVN repositories structure running Apache 2.2 under Windows Server 2008:

http://example.com/svn/ is targeted to e:\svn (root)

http://example.com/svn/dir/ is targeted to e:\svn\dir (some directory with a number of repositories)

http://example.com/svn/dir/repo/ is targeted to e:\svn\dir\repo (a repository itself)

How to access list so group @foo had rw access to repo?

I have next access list:

[groups]
@foo = user1, user2

[/]
* = r

[dir/repo:/]
@foo = rw

The last string doesn't work in any combination I tried

Apache conf is next:

<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>
+2  A: 

If you've configured this as

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

then you probably just want

[repo:/]

because the access list will be relative to e:\svn\dir. If not, could you post the <Location> snippet for e:\svn\dir? Thanks!

Rup
Thanks for your answer! I edited my post.
abatishchev
PS: `[repo:/]` doesn't work. Maybe I have to create a separated access list file for each directory under root? (I have a number of `<Location>` with different `SVNParentPath`)
abatishchev
Thanks - that all looks OK to me :-/ Sorry, one thing I didn't spot before: I think it's just "foo = user1, user2" not "@foo =" in the groups definition, or at least we only use the @ for the directory permission lines. I still think it's just [repo:/] without the dir in the svn-acl.txt that's referenced by your <Location /svn/dir> though.Didn't see your PS before I posted that - I guess not then. If that doesn't work I'm out of ideas, sorry :-/
Rup
I set separated access list file to Dir (svn-access-dir.txt) where set rules relatively and it works, i.e. `[repo:/]`. But it's very interesting - is it possible to have one file for all subdirs?
abatishchev