[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Sharing SVN-Repository between Linux/x86 and WinNT

From: Jamie Wilkinson <jaq_at_spacepants.org>
Date: 2005-06-12 04:36:48 CEST

This one time, at band camp, Folker Schamel wrote:
>Jamie Wilkinson wrote:
>
>>I found it was usually caused by incorrect permissions on the
>>repository. Because there is no way to set the umask on the server, I
>>had to create a wrapper script for svn and svnserve in /usr/local/bin
>>which set the umask correctly for everyone. That solved the problem of
>>needing to recover the database regularly.
>
>Since I am no Linux expert and don't understand exactly what
>this means, could you explain more in detail what exactly you did?
>Maybe you can provide your wrapper script?
>This would be great!

Sure.

The default umask on our fileserver (where the repository is being
stored) is 077, which means that any file that gets created defaults to
unreadable and unwritable to anyone other than the person who created
it.

We use the 'devel' group to grant access to the repository, and so the
reposutory itself is group-owned by devel and all the directories have
the set-group-id bit set, so that any new files also get created with
the devel group -- but this doesn't force read/write to the devel group.

So, to make sure everyone's umask allows the rest of the group to read
and write to the subversion database after they've made a commit, I use
the following scripts in /usr/local/bin on the fileserver, which just
happens to be in the PATH before /usr/bin.

-- snip /usr/local/bin/svn --
#!/bin/sh
umask 002
exec /usr/bin/svn "$@"
-- snip --

-- snip /usr/local/bin/svnserve --
#!/bin/sh
umask 007
exec /usr/bin/svnserve "$@"
-- snip --

-- 
jaq_at_spacepants.org                           http://spacepants.org/jaq.gpg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 30 02:35:45 2003

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.