Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not too familiar with this, and not a network administrator in general, but I am attempting to set up multiuser access to an svn repository on a local server.

So far I have installed subversion via

cd /usr/ports/devel/subversion
make install clean

Now I'm looking at how to configure and set up repositories and access. I have looked at the greatly useful SVN Book, however I'm looking for any examples/tutorials specific to FreeBSD.

The access to the respositories has to be via SSH.

Any advice would be appreciated.


share|improve this question
Do you want to know how to add users to the system or how to create a repository? What seems to be the problem? – Gleb Oct 1 '09 at 12:55
I dont know much at all to be honest! I have come across - its 4 years old so would it still be a relaible source to follow? – woowooct Oct 1 '09 at 13:06

Make sure you install the port with the svnserve wrapper enabled.

Note: Most--if not all--of the below commands must be executed as root.

Create an svn user group and add all the unix accounts you want to have access to it:

pw groupadd <group>
pw groupmod <group> -m <user>[,<user2>,...]

Then, create your repository:

svnadmin create /path/to/repos

Change its ownership to the group:

chown -R :svngroup /path/to/repos

Optionally, remove read-access from 'other' users:

chmod -R o-rwx /path/to/repos

And change permissions to allow group members sticky (append-only) access to the repository db:

find /path/to/repos/db | xargs chmod g+w
find /path/to/repos/db -type d | xargs chmod g+s

Test read access by ssh'ing as a user with svngroup membership:

svn info svn+ssh://user@host/path/to/repos

Test write access by creating your trunk dir (or whatever you want to call it):

svn mkdir svn+ssh://user@host/path/to/repos/trunk

You may be asked for your ssh password multiple times per svn command if you are not using key exchange.

share|improve this answer
A warning for others, pw usermod <user> -G svngroup will for a user that are in other groups, overwrite those other groups. Make sure you do not unintentionally remove users from e.g. wheel. You can use pw usermod <user> -G svngroup,wheel or edit /etc/groups by hand instead. – CodeReaper Jan 23 '12 at 13:51
Yikes, good catch. Updated to use groupmod -m. – scribble Feb 18 '12 at 17:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.