Step 3: Access control

At this point subversion is running and it's best time to think about user access rights to repositories.
First create new group for svn users and assign it to your repo. In my case I've defined one repository special for java projects so i wanna use special group for that.

$ addgroup svnjava # create new group for java repository
#apply that group to the repository location
$ chgrp -R svnjava /srv/svn/java

Soon user aho will be able to access subversion repository, but first we have to proceed with the next step.

Step 4: Additional configuration

Repository needs to be configured a little to be useful. Open conf/svnserve.conf in you new repository

$ nano /srv/svn/java/conf/svnserve.conf

and remove comments (#) from these lines.:

anon-access = read
auth-access = write
realm = My Java Repository

Then save that file.

Step 5: Umask

After previous steps we have an repository which is suitable for one user but concurrency usage by many users will run into problems by default umask 022.
So the common solution is to make a wrapper invocation of subversion. Let's create an wrapper step by step.
Find where you subversion i currently installed with the following command.

$ which svnserve
#returnes me
#/usr/bin/svnserve

Now rename original svnserve to svnserve_orig, create new file named svnserve with following:

UPD! Subversion with Mod DAV

On default svn is not called by a superserver line xindet .d. But it does not matter if you prefer svn+ssh access. In this case you access the svn machine directly trough ssh and call svnserve commands virtually direct on remote machine, so don't need to configure anything more.

But, if you have problems with firewalls, witch clients software or just want to have more flexibility, you may be interested in accessing you repository through http:// or https://. In dies case mod_dav commes in to play.

Mod DAV step by step

1) Install Apache server if not already done it.

$ apt-get install apache2

2) Configure Apache Server

Normally Apache package has all of the common mods including moddavsvn. Debian distribution has a package libapache2-svnwhich registers needed modules for you.
So just install it:

$ apt-get install subversion libapache2-svn

Now all needed modules are registered to Apache. You just have to provide a concrete configuration for your svn repository.
Here is one simple example how i do it i my case. Works fine.