Random notes from mg

a blog by Marius Gedminas

Marius is a Python hacker. He works for Programmers of Vilnius, a small Python/Zope 3 startup. He has a personal home page at http://gedmin.as. His email is marius@gedmin.as. He does not like spam, but is not afraid of it.

Mon, 04 Oct 2004

Setting umask for Subversion

If you want to set up a shared Subversion repository, accessible over SSH, you need to make the following three directories group-writeable (and setgid):

  1. /path/to/svn/repository/db
  2. /path/to/svn/repository/locks
  3. /path/to/svn/repository/dav (not sure about this, it's likely that it is not necessary if you only want SSH access)

You also need to make sure that all user accounts that access the repository have the correct umask (002 instead of the default 022). If you do not do that, the repository will break when two different developers access it, and you'll have to go fix the permissions and run svnadmin recover.

Setting the umask is tricky because there are a lot of places where you think you could set it, but most of them do not work. Also, testing is difficult because interactive SSH sessions act differently from noninteractive ones. Here are some red herrings:

The correct solution is to put umask 002 in /etc/bash.bashrc, and make sure that user's .bashrc files do not override it.

posted at 14:54 | tags: | permanent link to this entry | 0 comments

Name (required)


E-mail (will not be shown)


URL


Comment (some HTML allowed)