1
votes

I set up a svn server following http://www.oliverdavies.co.uk/blog/2011/10/install-and-configure-subversion-svn-server-ubuntu. I have created a password for it, and when using web browser to view, it did require password, but when I use "svn checkout http://", I can pull all things in the repository as if there is no password. Does anyone know what's going on here?

My configuration of /etc/apache2/apache2.conf contain the same thing as in the above mentioned post, which is

<Location /svn>
   DAV svn
   SVNParentPath /home/svn
   AuthType Basic
   AuthName "SVN Repositories"
   AuthUserFile /etc/svn-auth
   Require valid-user
</Location>

[!SOLVED] It turns out that it can be solved by moving <location /svn> configuration from /etc/apache2/apache2.conf to /etc/apache2/mods-available/dav_svn.conf.

1
Post your Apache configuration? - TypeIA
update the /etc/apache2/apache2.conf in above, is that what you mean? - chentingpc
I don't see anything wrong with that configuration. - Ben Reser

1 Answers

0
votes

I suspect one of two things:

Either you've been using the current user account to test the repository via svn command line commands, and have cached your credentials; or some other part of your Apache httpd configuration is allowing access to the same directories, bypassing the svn authentication in your sample.

To test the former, you can either try these instructions or you can simply delete the entire ~/.subversion directory. If a subsequent svn co command fails, asking for a password, then your problem is solved.

To test the latter, comment out the entire <Location /svn> chunk, and try accessing it via svn co again. If you still can, then some other portion of your httpd configuration is providing access to that directory. In that case, you need to carefully check your configuration (which can be spread across multiple files) for anything that might grant access to the /home and/or /home/svn directories. Remember, Apache can be configured to allow users to access their own home directories, that might be the problem.

You might also check for symbolic links to the /home/svn directory from other directories that Apache HTTP allows access to.

Hopefully Helpful!