I have an ubuntu system & installed subversion on it. Now i want to create multiple repository on it. All the repository must have their own logins.

for example---example.com/svn/repo1 : user--1

example.com/svn/repo2 : user--2

example.com/svn/repo3 : user--3

Now user1 must not access the repo2 & repo3. & user2 must not access the repo1 & repo3

I am able to create the multiple repos but not the logoins. Please help me out.



Use dav_svn_module

Here is a sample conf, look to svn book to go deeper

LoadModule dav_svn_module /usr/lib/apache/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache/mod_authz_svn.so

<IfModule dav_svn_module>
<IfModule authz_svn_module>
<Location /svn>
    DAV svn
    SVNParentPath /svn

    AuthzSVNAccessFile /etc/apache2/svn_authz
    Satisfy Any
    Require valid-user
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /etc/apache2/svn_passwd

An authz example:

cat /etc/apache2/dav_svn.authz

admin      = foo
graph      = bar
developers = foo,baz

*           =
@admin      = rw
@developers = rw
@graph      = r

*           =
@admin      = rw

*           =
@admin      = rw
@developers = rw
@graph      = rw

*           =
@admin      = rw
@developers = rw

*           =
@admin      = rw
@developers = rw

Use svnserve instead of Apache server. Inside the repository you created, you will find a conf directory. Using your preferred text editor edit the following files with these changes:

In svnserve.conf uncomment the following: [general]

anon-access = read (and change read to none)

auth-access = write

passwd-db = passwd

In passwd file add the usernames and their corresponding passwords in the format username = password

admin = adminspass
dev1 = devspass

Make similar changes in all your repositories and start the svnserve using the command: svnserve -d --foreground -r /root/dir/of/repo i.e. if you created the repositories in /home/svn as told in many tutorials, the command will look like svnserve -d --foreground -r /home/svn

The repos can be accessed using any svn client with the URL:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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