Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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
share|improve this answer

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.

share|improve this answer

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.