Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Subversion system running. It always does an post-commit update on /var/www by the following code: /usr/bin/svn update /var/www/. But, this is OK when I am working on an other server. I do a commit, and it updates the /var/www/ directory on the main server. But, when I am working on the main server, the post-commit hook will fail, because I am modifying files in /var/www/. How can I prevent this?

Regards, Kevin

share|improve this question
Possible duplicate: – Hubert Kario Sep 24 '12 at 12:56
Simple, don't make modifications on your production system. That is a very bad practice. – Zoredache Sep 24 '12 at 17:13
Yeah, I know... Can you please tell my boss :p..? – Kevin Sep 24 '12 at 19:16

Not sure I understand well, bu it looks like you are doing this on same server (srv1) It fails when you add same hook while on a different server (srv2).

If you have same hook on srv2 and want update to update srv 1 you can use ssh command to execute cnv update remotely

ssh /usr/bin/svn update /var/www/

but for this to work without asking for password you need to setup keys for a user that can run svn (avoid root)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.