My hosting provider had enabled Trusted Path Execution (Grsec), so all my subversion hooks (for example post-commit) stopped working. Any attempt to commit something ends with warning:
post-commit hook failed (exit code 255) with no output.
I checked, that scripts can be run manually using following syntax:
bash post-commit [PATH] [REV]
but not by:
./post-commit [PATH] [REV]
I think Subversion uses the last one, which cause the problem. So is it possible to change the way which subversion handle hooks?
Hook execution method is hard-coded in Subversion and you have to patch the source and re-build it, if you want to change that. The relevant code may be found in subversion/libsvn_repos/repos.{c,h} in the source distribution.
By the way, hooks are currently executed by their full path (as in
/path/to/your/repo/hooks/post-commit
) and not withcd /path/to/your/repo && ./post-commit
.