Limiting Subversion Users via SVN Access File

I was in a situation I wanted to setup a SVN repostitry which allowed a friend of my to only contact certain projects readonly. To other projects he should have commit rights. Some projects are publicly accessible.

Well after some sweating I found out I was trying it the wrong way. I was trying very hard to use the LIMIT option of the apache config file.. Well this is NOT the way to go. It seems possible to define a SVN ACL file which is extremely flexible in defining the rights. You can even limit rights on path basis !

Summary:

Here ‘s my solution.
The apache config file

<Location /subversion>

<location>DAV svn
SVNParentPath /data/svn/repos</location>

AuthType Basic
AuthName "Authorization for required"
AuthUserFile /data/svn/.htpasswd
AuthzSVNAccessFile /data/svn/svn-acl

require valid-user
&lt;/Location&gt;

The ACL file “/data/svn/svn-acl”

## The groups
[groups]
committers=john, jake

readers=jan, emma

#
# Format:
#
[project:/]
@committers = rw
emma = r
* = r

[projectX:/path/]
committers = rw
emma = rw
* = r

BTW. You can create users with the standard Apache command

# Create the passwordfile
htpasswd -c /data/svn/.htpasswd  johndoe

# Add a second user
htpasswd /data/svn/.htpasswd  emma

Leave a Reply

Your email address will not be published. Required fields are marked *

*


9 - one =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>