views:

63

answers:

2

Hi guys,

I'm trying to setup subversion, so everytime someone commits a change, it updates a working directory that we'll use on a dev box as the 'test' site.

I've setup post-commit, and added the line:

#!/usr/bin/perl /usr/bin/svn update /home/administrator/sites/checkmyid --username root --password xxx

Can anyone tell me why this doesn't work when run automatically, but when I run it at the command prompt:

sudo ./post-commit /home/administrator/sites/svn

It works fine?

I've tried chaning the owner of the working directory to www-data but it doesn't seem to want to work?

FIXED IT MYSELF

Basically, it was a permissions problem. I used the command

sudo chown -R www-data /home/administrator/sites/checkmyid

And now it works perfectly!

+1  A: 

Your post-commit script contains bash code, but the shebang is saying to use Perl to run it.

Plus, shebang lines should be on their own line; put the actual commands to run on another line.

Ether
A: 

sudo chown -R www-data /home/administrator/sites/checkmyid

Sjwdavies