Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

On an Ubuntu server, I have a directory containing Subversion versioned files. I have used chgrp bb * to set the group owner.

I have also set the directory's SGID bit with chmod g+s mydir so that new files are created with this group:

drwsr-sr-x 4 mat bb  4096 Dec  4 21:37 mydir

This works fine if I create a new file with touch test-touch

-rw-r--r-- 1 mat bb        0 Dec  4 21:43 test-touch

But svn update does not have the same effect:

-rw-r--r-- 1 mat mat    3006 Dec  4 21:44 test-svn

How can I get Subversion to respect the SGID bit?

share|improve this question

Going by this discussion on the SVN mailing list, it's not possible to preserve a file's permission bits in SVN, apart from the executable bit which has a special SVN property.

share|improve this answer

According to Version Control with Subversion, the solution is to make sure the instance of svn or svnserve accessing the repository is running with umask 002, see this.

share|improve this answer

I used to have the same problem with subversion on a RHEL4 machine. After having migrated the repository to a RHEL5 machine (and thus to another version of subversion), the problem went away.

share|improve this answer

Is the subversion executable running as user bb or mat? To find out, check the permissions on the svnserve binary(on my system it's /usr/bin/svnserve. Also check the group that it's owned by.

share|improve this answer
svnserve is owned by and group root - ls -l /usr/bin/svnserve: -rwxr-xr-x 1 root root 50432 Aug 7 2009 /usr/bin/svnserve – Mat Feb 8 '10 at 17:35

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.