Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

4 Answers

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
add comment

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.