2

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.

2 Answers 2

4

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
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .