views:

43

answers:

2

Im trying to create a synchronization between [Unfuddle][1] and my local server so that when there is a SVN commit on Unfuddle, my local server's code automatically gets updated. Unfuddle provides a callback and I can get the callback when a commit is made.

Now my webserver runs as the user called "apache", but all the files that are existing are owned by a "development" user. This is the ftp user that my team uses to update code everyday. I want to make it so that my callback will write the files as the "development" user.

These are the ones Ive tried so far to make this work

  1. I cant use sudo -u development as that means I have to relax running "sudo" command for apache.
  2. Changing file permissions to 777 works, but obviously, thats not something that I want to do.

The only option that I can think of now is run a standalone Python HTTP Server and make it run as the "development" user and make that the callback url. That way, I can update the local working copy as "development" user and my other folks can also use it as they were doing it before.

Are there any other ways of doing this?

Thanks!

+1  A: 

For personal use, I'd use the Python HTTP Server approach, but if you're happy with Apache -- I imagine a script will then run to getch fetch things from Unfuddle svn into local. In that case, try mod_suexec, which runs scripts as a different user.

sigint
A: 

Have you considered putting the two users in the same group, and giving permission for the group?

Sinan Taifour
I did try that, but because of the nature of the synchronization, svn update will create new folders which isnt possible unless I specify 777. These files and directories are owned by "development" and providing a umask seems to be the only way I can provide read/write permissions for the group, but setting umask from the script before running the "svn update" doesnt work as well.
rajasaur