svnhookpost-commit

svn update not working in post commit


I am trying to implement a post-commit hook to update a working copy. As far as i can figure out the post commit hook is being run (I wrote something in a file to verify it) but the update command was not run.

At first I did

cd /home/user/working/copy
svn update

but that didn't work, then I read you have to give the full path to svn:

cd /home/user/working/copy
/usr/bin/svn update

but still it failed to work.

I changed permisions to 777 and have run the script in an empty enviroment ... and it works.


Solution

  • the final solution that i got working was a mix some of the answers i got. My server had apache running as nobody, so i made the working copy be owned by nobody and in the group UserName and then chmod it to 775. This way the hook will work and also the username will also have permision to update files by FTP.