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'm trying to provide an access to WebSVN in my server but I can't. The goal is to show some repos only to people who are logged in and admin of that repo. For instance, I have two repos, one of them totally open to all users (repo1) and the other restricted to some users (repo2). So my dav_svn.access file is:

[groups]
admins = user1, user2, user3

[repo1:/]
* = r

[repo2:/]
@admins = rw

Then, my site has a /websvn resource:

Alias /websvn /var/www/websvn
<Location /websvn>
    SetHandler None
</Location>

<Directory /websvn>
    Order allow,deny
    Allow from all
    DAV svn
    SVNParentPath /var/lib/svn/repos
    SVNAutoversioning on

    AuthzSVNAccessFile /etc/apache2/dav_svn.access
    Satisfy Any
    AuthType Basic
    AuthBasicProvider  ldap-jderobot
    Require valid-user ldap-user

    AuthName "Subversion repo"
    ModMimeUsePathInfo on
</Directory>

And in my config.php file in the include directory of /var/www/websvn I have:

$config->parentPath('/var/lib/svn/repos/');
$config->useAuthenticationFile('/etc/apache2/dav_svn.access');

But if I put myself into the admins group I can't see repo1, neither if I logged in or not. The login service is LDAP, but it is not the problem because I don't see anything in the log files. I'm working on a Debian 6 machine.

Do you know what I'm doing wrong? Another solution to my problem?

Thanks!

share|improve this question
add comment

1 Answer

I believe, but am not sure, that WebSVN cannot take credentials and pass them along to SVN. Instead, WebSVN is designed to use its own set of credentials to talk to the SVN server.

What you may want to do instead is setup multiple copies of WebSVN. One WebSVN URL that is protected with a password or Apache authentication and lets people browse the more restrictive repositories, this copy of WebSVN would need to be configured with a read-only password that lets it browse the repositories.

The second WebSVN URL could be more open, using WebSVN credentials that give read-only access to the more public repositories.

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.