1

I have created the repository long time ago when I was the only user. Now I need to add another user, so I created a usergroup where I added the both users and did the following:

chmod -R user1:usergroup svnrepo/*
chown -R 0770 svnrepo/*

Now we all have the ability to update and commit but the problem is that when one of us commits, it aparently changes the owner of svnrepo/db/current (to the user who committed) and the other person loses access to the repo, until I manually set the proper owner again.

Do you have an idea how to fix that? It is extremely annoying...

2

I don't believe this is a recommended way to share access to a SVN repository. You're using the file:/// protocol to access the repo and it's generally discouraged to do it this way. See this StackOverflow Q&A titled: svn repository on Windows network share.

From the TortoiseSVN documentation

file:// access is intended for local, single-user access only, particularly testing and debugging. When you want to share the repository you really need to set up a proper server, and it is not nearly as difficult as you might think. Read the section called “Accessing the Repository” for guidelines on choosing and setting up a server.

This same sentiment is echoed in the SVN Bean Book as well.

Do not be seduced by the simple idea of having all of your users access a repository directly via file:// URLs. Even if the repository is readily available to everyone via a network share, this is a bad idea. It removes any layers of protection between the users and the repository: users can accidentally (or intentionally) corrupt the repository database, it becomes hard to take the repository offline for inspection or upgrade, and it can lead to a mess of file permission problems (see the section called “Supporting Multiple Repository Access Methods”). Note that this is also one of the reasons we warn against accessing repositories via svn+ssh:// URLs—from a security standpoint, it's effectively the same as local users accessing via file://, and it can entail all the same problems if the administrator isn't careful.

Read through the SO Q&A. There are number of people attesting to problems they ran into, doing it this way where the repository got corrupted.

Better to setup an actual svnserve daemon and let it control access to the repository. It's pretty simple to set this up.

0

I would recommend setting up svnserve, and accessing the repo via svn:// or ssh+svn://

Alternatively, if you wish to keep using the file:// method, make sure both you and your friend are in the same group, and set the repo directory to use the set group permission

usermod -a -G <group> <user>
chgrp <group> /path/to/repo
chmod 2770 /path/to/repo

this will ensure that any new files created will inherit group permissions, and should help alleviate filesystem permission issues.

  • For setting it up I used this tutorial: howtoforge.com/debian_subversion_websvn and I am accessing the repo using svn+ssh:// . I can't tell if I am using svnserve, I don't remember such thing. – barakuda28 Jul 19 '13 at 10:10
  • From what I read online, it seems I am already using svnserve. – barakuda28 Jul 19 '13 at 10:19

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.