Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've had a nicely functioning svn server running on windows that uses Apache for access. In the original setup every user had access to all repositories, but I recently needed the ability to grant a user only access to one repository. I uncommented the AuthzSVNAccessFile line in my httpd.conf file and pointed it to an accessfile and setup the access file, but I get a 403 Forbidden when I go to mydomain.com/svn . If I recomment out this line then things work again. I also made sure I uncommented the LoadModule authz_svn_module and verified that it was point to the correct file.

Below is the Location section of my httpd.conf and my svnaccessfile

httpd.conf (location section only)

<Location /svn>
    DAV svn
    SVNParentPath C:\svn
    SVNListParentPath on
    AuthType Basic
    AuthName "Subversion repositories"
    AuthUserFile passwd
    Require valid-user
    AuthzSVNAccessFile svnaccessfile
</Location>

(I want a more complex policy in the long run but just did this to test the file out) svnaccessfile

[svn:/]
* = rw

I have also tried just the below for the svnaccessfile.

[/]
* = rw

I also restart the service after each change just to make sure it is taken.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

It looks like I have resolved the issue by changing the start of the Location tag to

The difference being the trailing /

share|improve this answer
add comment

What got filtered out of the above answer was the <Location /svn/>

You also need the:

[/]

section in your acl file with the appropriate permissions

share|improve this answer
add comment

This only works if you want to allow everyone access.

My ACL file is simply:

[/]
scott = rw

This produces a 403 error, but if I change the ACL file so it instead is:

[/]
* = rw

...that allows access.

Still working on figuring out why * allows access but a specific user causes the 403 error (I have that user defined in an htpasswd file that is referenced with AuthUserFile)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.