Add Comment

You are not currently logged in. If you do not have a user account then please consider creating one and logging in before you post your comment. This will allow you to track replies to your comment, and take part in the site much more freely.

To add your comment, fill in all the boxes below and then preview it to make sure you're happy with the way that it looks.

This is the comment you were replying to, attached to the article Playing with SVN:


Re: Playing with SVN
Posted by jwm (203.79.xx.xx) on Mon 20 Mar 2006 at 11:01

The subversion book is pretty sloppy at telling you how to manage the repository ownership, which tends to bite new admins, especially when using file or ssh+svn access. It doesn't help that the debian package doesn't step up to the plate and do the right thing.

Basically, you have to make sure that the repository files and directories are writable by all the users with commit access to it. In your case—access via Apache only—this means you should set the repository to be owned by the web server user (ie www-data), (as root):

chown -R www-data:www-data /home/dinesh/svn/repos
find /home/dinesh/svn/repos -type d chmod 2755 "{}" /;
find /home/dinesh/svn/repos -not -type d chmod 0644 "{}" /;

It's probably a smart move to shift this repository to something like /var/lib/svn/repos, too.

The svnserve case is much the same, as the repository only has one system user, however if you want to use file: and svn+ssh: access methods instead or as well, you need to do a bit more work:

  1. Set up a group for all your subversion users with write access, say svn-users. Put all the users in it, including the svnserve and apache user if you want access via those methods.
  2. Change the group ownership on the whole repository to svn-users
  3. Make sure the group write bit is set on all the repository files and directories
  4. Make sure the set group id bit is set for yourrepos/db and it's subdirectories, so that new files created will have the correct group ownership set (svnadmin does this for you automatically)
  5. When using the file: or svn+ssh: access methods, make sure the umask has been set to 0002 or similar. Debian's default umask is 0022, which filters out the group write permission. A wrapper script is probably the best way to handle this.

This applies to Subverson 1.1.x in sarge. I think these issues might have been addressed in 1.2 and greater that's in etch. I haven't really tinkered with it recently.


Username:Anonymous
Title:
Your Comment:

Posting Format:

 

Inappropriate comments will be removed.

Some help on entry formatting is available

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search