websvn access rights for individual repositories, FML

Discussion in 'Server Operation' started by mmw, Jul 31, 2009.

  1. mmw

    mmw New Member

    Hi all,

    I'm having a lot of trouble getting websvn to give different SVN repositories different access rights. I would like "myRepo1" to require a username/password, and "myRepo2" to not require any authentication. FYI, I installed websvn using the Debian websvn HowTo article.

    1) What is the location of the "svn access file" I should be using? My users connect to svn though SSH - all of us have accounts on my server. Does that mean I should be using /etc/passwd? I tried using "/etc/passwd" in my /etc/websvn/config.php file like so:
    Code:
    $config->useAuthenticationFile('/etc/passwd', '/var/svn-repos/myRepo1');
    
    It complains about "/var/svn-repos/myRepo1" not existing..even though it does, so first of all, why does it not recognize SVN repo names?

    Not to worry though, I can force websvn to detect my repository like so:
    Code:
    $config->addRepository('myRepo1', '/var/svn-repos/myRepo1');
    
    But now when I load up websvn in my web browser I notice that there is NO authentication - i.e it never asks for my user/password. If I switch back to $config->parentPath in my config.php file I see the prompt for username/password, but it now requires authentication for BOTH repo1, and repo2...FML :(

    2) Does my /etc/websvn/apache2.conf look OK?
    Code:
    # Configuration for websvn using php4.
    
    Alias /websvn /usr/share/websvn
    
    <Directory /usr/share/websvn>
      DirectoryIndex index.php
      Options FollowSymLinks
      AuthType Basic
      AuthName "Subversion repository"
      AuthUserFile /etc/passwd
      Order allow,deny
      Allow from all
      <IfModule mod_php4.c>
        php_flag magic_quotes_gpc Off
        php_flag track_vars On
      </IfModule>
    </Directory>
    
    Any help with this would be appreciated. Since websvn doesn't provide any kind of documentation it has been really frustrating trying to troubleshoot this :(

    Thanks,
    Mark
     

Share This Page