Project

General

Profile

Problem authenticaing with webdav/perl/svn

Added by R Sonnenberg over 12 years ago

Hello all,

Last night I spent a few hours trying to get the apach/mod/dav/svn authentication to work as it is described here:

http://www.redmine.org/projects/redmine/wiki/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl ;

but without success.

Here's what I did:

  • downloaded the latest Redmine VM package from the turnkey website (version 11.2 of the VM)
  • updated all packages
  • created a mysql user called apache_dav_svn and granted this user all priviliges on the railsapp_production database; I tested this by logging in from the command line with this user and everything worked as expected
  • created a test account in Redmine and added it to the default svn-helloworld repository
  • ran the following command:

sudo apt-get install libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl

  • enabled the apache modules using:

sudo a2enmod dav
sudo a2enmod dav_svn
sudo a2enmod perl

  • copied Redmine.pm (from /var/www/railsapp/extra/svn/Redmine.pm) to /usr/lib/perl5/Apache/Redmine.pm and to /usr/lib/perl5/Apache2/Redmine.pm
  • changed the dav_svn.conf file in /etc/apache2/installed-mods/; here are the contents of the file:

@# /svn location for users
PerlLoadModule Apache::Redmine
<Location /svn>
DAV svn
SVNParentPath "/srv/repos/svn"
Order deny,allow
Deny from all
Satisfy any

PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "Redmine SVN Repository"
#read-only access
&lt;Limit GET PROPFIND OPTIONS REPORT&gt;
Require valid-user
Allow from 192.168.8.23 # Allow from another-ip
Satisfy any
&lt;/Limit&gt;
  1. write access
    <LimitExcept GET PROPFIND OPTIONS REPORT>
    Require valid-user
    </LimitExcept>
  1. for mysql
    RedmineDSN "DBI:mysql:database=railsapp_production;host=localhost"
RedmineDbUser "apache_svn_dav" 
RedmineDbPass "&lt;mypassword&gt;
&lt;/Location&gt;@

I have 2 problems:

  • When I try to access my repository via http, it asks for a password, but never authenticates; whatever user/pass combo I use
  • If I use svn:// instead of http(s)://, it never asks for any authentication (makes sense, but I would like to disable this possibility or force authentication as well).
Additional something I tried:
  • Changing the owner of the Redmine.pm file to www-data (the user running apache) and chmodding to 777 - no change

If anyone has any suggestions as to what I did wrong, please help me out! :)

Thanks in advance for your effort!