1

Yesterday, I mistakenly wrote a post-commit hook that fatally broke my server. In fact, when I committed via TortoiseSVN, I could see the post-commit hook remove significant system resources. When I tried to reboot the server, the server did not boot.

Anyway, I'm about to setup SVN again, and I don't want to make the same mistake. How do I restrict my post-commit hook permissions to only be able to modify certain folders?

1 Answer 1

1

What user is SVN running as?

On my system, SVN is running with the Apache user via DAV, so the user it is running as is www-data, so it wouldn't have access to critical system resources outside the scope.

2
  • Actually, I'm not sure who SVN itself was running as. I know I was committing under my user that I setup, which does have extensive permissions. Does the post-commit hook get run under the permissions of the committer or as the permissions of the SVN executable? I setup SVN using this guide: help.ubuntu.com/community/Subversion Jun 21, 2011 at 0:42
  • 1
    Yes. If you're using the direct access method, it will run as the user you login with. I would suggest making the switch to WebDAV, so that commits/hooks will run as www-data, which will prevent a bad hook from causing any system wide problem. Jun 21, 2011 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .