16 May 2006

Having both WebDAV access and being able to hotcopy a Subversion repository

I use the Subversion version control system for a couple of things. Every night I make a backup of the repository to a remote server, having hot-backup.py run by a user in the svnusers group without further privileges. So all files in the repositories should be group readable and writable. This is relatively easy to accomplish for local and svn+ssh users with the Subversion book. However, for access via WebDAV there are more steps and they're not so easy to find out:

  • Change group ownership of all files in the repository to svnusers.
  • Set the SGID permission bit on the dav/, db/ and locks/ directories, so new files will also be owned by svnusers.
  • Run apache httpd with the mod_umask module. It's undocumented, but reasonably simple. First install it (it's not part of a standard apache install). This may entail compiling from source. Then just put
        LoadModule umask_module /usr/lib/apache2/modules/mod_umask.so
    and umask 0017 somewhere in your httpd.conf (or if you're so lucky as to be running Debian, use the tricks by them: add the LoadModule to a new file in mods-available and the umask to the file in sites-available that takes care of your Subversion repository, then enable them).

Of course, now you still need to enable SSL to make it secure...

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home