Hi folks, I've been googling this stuff all day, and while I get tons of results, nothing seems to help me resolve the problem.
I've installed SVN on my remote Apache server. I set up my repository, and added all of my code files. No problem. I installed TortoiseSVN on my local windows machine, and can check out and commit files without issue. I've also checked out the files on the remote server, as the project is a web site. I want to do a post commit hook, so that every time I commit, the remote server's working directory does an update. I made a copy of post-commit.tmpl in the hooks directory, and set the executable flag for all users. My problem is that every time I do a commit via TortoiseSVN, I get back the following error:
post-commit hook failed with error output:
Never mind for the moment the actual contents of post-commit--it's simply not executing. I've been reading all these posts about users, groups, permissions, etc, and I just can't seem to get the big picture. A lot of folks mention that the post-commit must be owned by the same user that runs apache, or something like that. I need details! If true, exactly how do I find out which user and group is running Apache? Is that the end of the story? What about the credentials I use to commit to SVN via TortoiseSVN? Do they matter? Is it just the permissions and user on post-commit that matters, or is it the whole svn installation?
I've tried setting the owner of the entire svn working directory (hooks and all) to every conceivable combination I can think of (apache.apache,root.root,root.psaserv,apache.root), on and on. For the moment I'm using root/rootpassword as my Tortoise credentials.
Here's the contents of my hooks directory:
-rwxr-xr-x 1 apache apache 2061 Feb 2 18:04 post-commit
-rw-r--r-- 1 apache apache 2015 Feb 2 07:44 post-commit.tmpl
-rw-r--r-- 1 apache apache 1638 Feb 2 07:44 post-lock.tmpl
-rw-r--r-- 1 apache apache 2255 Feb 2 07:44 post-revprop-change.tmpl
-rw-r--r-- 1 apache apache 1567 Feb 2 07:44 post-unlock.tmpl
-rw-r--r-- 1 apache apache 2934 Feb 2 07:44 pre-commit.tmpl
-rw-r--r-- 1 apache apache 2038 Feb 2 07:44 pre-lock.tmpl
-rw-r--r-- 1 apache apache 2764 Feb 2 07:44 pre-revprop-change.tmpl
-rw-r--r-- 1 apache apache 1979 Feb 2 07:44 pre-unlock.tmpl
-rwxrwxrwx 1 apache apache 0 Feb 2 19:48 sanity.txt
-rw-r--r-- 1 apache apache 2137 Feb 2 07:44 start-commit.tmpl
-rwsr-sr-x 1 root root 4802 Feb 2 14:32 svnupdate
-rw-r--r-- 1 apache apache 212 Feb 2 14:32 svnupdate.c
I'm at my wit's end, folks. Please, help a poor Linux newbie out!