2

How can I setup write access policies for an SVN repository under Apache2 on Windows Server 2008? Please help. TIA!

Update1:

I have next configuration already:

<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>

File D:\Program Files (x86)\Apache 2.2\svn-auth.txt created with htpasswd and looks like this:

foobar:$apr1$cV5.....$iwiJXkY6qlKopphUxlPMM/

All works fine.

File D:\Program Files (x86)\Apache 2.2\svn-acl.txt looks looks this:

[groups]
full = foobar

[/]
@full = rw
* = r

And when I uncommented AuthzSVNAccessFile svn-acl.txt I got

403 Forbidden
You don't have permission to access /svn/ on this server.

Here is an error.log record:

The URI does not contain the name of a repository.  [403, #190001]

I need next directories hierarchy:

E:\SVN is a root directory for all repositories - I want to list the all. It contains E:\SVN\test - is a project repository.

and E:\SVN\foobar - is a sub-root directory containing E:\SVN\foobar\foo and E:\SVN\foobar\bar - project repositories.

18
  • can you remove "SVNListParentPath on" from your config and try to access it again + post error result if it still does not work?
    – pQd
    Dec 22, 2009 at 19:00
  • can you list files you've got in e:\svn ; can you check if user under which apache runs has full access to the files? ; can you paste your config file again ; just for testing - can you put <Location /svn2/> instead of <Location /svn> and use in the svn client localhost/svn2 [ with the slash at the end ]
    – pQd
    Dec 22, 2009 at 19:27
  • aa - and for checking - just use the web-browser. not svn client.
    – pQd
    Dec 22, 2009 at 19:28
  • @pQd: All configurations work perfectly without specifying AuthzSVNAccessFile. localhost/svn lists directories of e:\svn. Changing Location in conf to svn2 moves it to localhost/svn2. Without file works fine, with - error 403 Dec 22, 2009 at 19:31
  • ok, but change just Location to /svn2 ; restart apache ; try with msie localhost/svn2 [ exactly like that! ], and provide the error log.
    – pQd
    Dec 22, 2009 at 19:41

2 Answers 2

1
+150

try adding slash after your svn in Location - change it from

<Location /svn> 

to

<Location /svn/> 

not really intuitive, found via this forum post.

1
  • lol; but it's done.
    – pQd
    Dec 22, 2009 at 22:23
2

to set up anonymous read-only svn access put in your vhost config for apache:

<Location /svn>
    DAV svn
    SVNPath /somewhere/svn
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        Order deny,allow
        Deny from all
    </LimitExcept>

svn with authentication / write access restrictions - take a look here.

you can find more details in the 'version control with subversion', in this chapter.

4
  • Thanks! I found some information already. But it doesn't work.. After I added AuthzSVNAccessFile svn-acl.txt login attempt returns 404 Forbiden. See more in my OP Dec 20, 2009 at 21:03
  • @abatishchev - did you tried putting full path to both txt files? what do you have in error.log of apache?
    – pQd
    Dec 20, 2009 at 21:12
  • @dQd: sorry, what do you mean 'full path to box txt files'? What and where? Dec 22, 2009 at 18:04
  • @abatishchev - i mean write in your apache full path to svn-auth.txt and svn-acl.txt ; and include here content of error.log [ probably in rootOfApach/logs/error.log ]
    – pQd
    Dec 22, 2009 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .