I´m a newbie in linux, and I configured my subversion using a lot of tutorials on the internet.

My subversion uses webdav and I add my users using the command:

htpasswd /etc/apache2/dav_svn.passwd userb

My dav_svn.conf contains follow configuration:

<Location /svn>
    DAV svn
    SVNParentPath /svn
    AuthType Basic
    AuthName "Subversion Repository"
    AuthUserFile /etc/apache2/dav_svn.passwd
    Require valid-user
<LimitExcept GET PROPFIND OPTIONS REPORT>
</LimitExcept>
</Location>

In the directory /svn I was created some repositories like /svn/test or /svn/chat.

My Question is: How can I restrict the respositories for specified users? Because all the users have permissions in all the repositories.

link|improve this question
feedback

2 Answers

add the following line below AuthuserFile

AuthzSVNAccessFile /srv/svn/conf/authz

Of cource change the path to your svn root to point to the authz file.. Then it might look like

[groups]
admin = user
devteam = user,user2,user3

[/]
@devteam = r
@admin = rw

[/some_repo]
@devteam = rw
@admin = rw
link|improve this answer
feedback

Adding onto Mike's answer from before, if you want the future capability to let users edit their own SVN access through a Trac plugin or similar, you could also give each SVN project its own Authz file. All my projects' SVN settings are held in separate files, one per project. Something like:

<Location /svn/projectname>
    DAV svn
    SVNPath /usr/local/svn/projectname
    AuthzSVNAccessFile /etc/apache2/authz/projectname
    ...
</Location>

This would be a pain to manage manually, so you'd want some sort of configuration management software on the SVN server, or your own scripts to generate the separate Locations.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.