[nycbug-talk] [OT] - Subversion Conflicts

Matt Juszczak matt at atopia.net
Mon Jun 29 14:08:22 EDT 2009


Hi all,

I was able to get the SVN repo solution working, however I'm having some 
permission issues.

Basically, I setup svnserve on one server.  Our webservers checkout from 
that server when we tell it to.  However, we only have one dev environment 
(dev.ourdomain.com) which points to an SVN checkout on a dev server 
(again, as a disclaimer in case someone ever googles my name, a total 
temporary solution for a week or two tops while we setup local sandboxes). 
=)

The problem I'm running into is this: the svn checkout is in 
/usr/local/www/webroot on our SVN server, which is owned recursively by 
www:users and set to 775.  Since everyone is in the users group, it works 
fine, for a while.  But new files in that directory are created with 
individual users permissions (username:users  instead of www:users), which 
is causing a problem later when people try to check files in can't 
overwrite other files.  Eventually, the checkout breaks.

There are a few options:

- Set the setuid bit recursively (and somehow tell freebsd to support 
this, I think there's a way) so that new files are created with the www 
user.

- Somehow make it so that new files created by regular users are created 
as 775.  This is a umask thing obviously, but can a umask be set 
recursively on a single directory only, or is this an environment thing 
only?

- Recursively chown/chmod every minute in a cron *YUCK* and hope no one 
tries to double check in in that time period.

- Write a wrapper that runs setuid to inherit the permissions of www, 
which would hopefully then create the .tmp files and such as user www.

- Allow people to sudo to user www upon checkin

- Run and hide.

Any ideas? :) Thanks all.  Again, this is a temporary solution.  If 
everyone could have their own repository this wouldn't be an issue, and 
that's coming soon.

-Matt



More information about the talk mailing list