/etc/init.d/svnserve does not change the current working directory. svnserve does not change its cwd either. Some hooks-scripts may fail silently. Running strace on svnserve will show something like this: [pid 29826] stat64("/svn/repo/hooks/post-commit", {st_mode=S_IFREG|0755, st_size=1527, ...}) = 0 [..] [pid 29826] clone(Process 29827 attached child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, [..] [pid 29827] chdir(".") = -1 EACCES (Permission denied) [pid 29827] exit_group(-1) = ? In this case, cwd was set to /root. Reproducible: Always Steps to Reproduce: 1. run /etc/init.d/svnserve start from a directory that the svnserve user cannot read. Actual Results: post-commit-hook stopped working. Expected Results: Have /etc/init.d/svnserve cd to / before running start-stop-daemon.
Does this not work with any hook scripts, or only with broken ones? In any case I've changed the init.d script.
Its caused by svnserve itself rather than the scripts, there is no execve() between the call to fork/clone and the chdir("."). Thanks for fixing this.