I have been searching these items all day long, even though I recieve a lot of results, nothing appears that helped me to resolve the issue.

I have installed SVN on my small remote Apache server. I setup my repository, and added all my code files. Not a problem. I installed TortoiseSVN on my small local home windows machine, and may take a look at and commit files without problem. I have also examined the files around the remote server, because the project is an internet site. I wish to perform a publish commit hook, to ensure that each time I commit, the remote server's working directory does an update. I designed a copy of publish-commit.tmpl within the hooks directory, and hang the executable flag for those customers. My issue is that each time I perform a commit via TortoiseSVN, I recieve back the next error:

post-commit hook failed with error output:

Let alone for now the particular items in publish-commit--it's not performing. I have been reading through each one of these posts about customers, groups, permissions, etc, and that i cannot appear to obtain the large picture. A lot of people point out that the publish-commit should be possessed through the same user that runs apache, or something like that like this. I want particulars! If true, exactly how do you discover which user and group is running Apache? Would be that the finish from the story? How about the qualifications I personally use to invest in SVN via TortoiseSVN? Will they matter? Could it be only the permissions and user on publish-commit that means something, or perhaps is it the entire svn installation?

I have attempted setting who owns the whole svn working directory (hooks and all sorts of) to each imaginable combination I'm able to think about (apache.apache,root.root,root.psaserv,apache.root), so on. For now I am using root/rootpassword as my Tortoise qualifications.

Here's the items in 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 am inside my wit's finish, folks. Please, help an undesirable Linux newbie out!

You may be able to better identify it should you run it the following:

$ unset PATH
$ <your_svn_repo>/hook/post-commit <your_svn_repo> <some_revision_number>

SVN's commit hooks run in an exceedingly restricted atmosphere without a penny around the execution path, so you've to make certain that each script you are writing could be run this way too.

Following on your comment, things i believe is going on would be that the first line inside your file includes a Home windows line ending, not really a unix one. Most likely you edited the file in Notepad as well as other Home windows editor that is not wise about line being.

Most likely your quickest path to setting it up working (which assumes that you are running on Linux or perhaps a system with dos2unix installed) is, in a command prompt:

dos2unix /var/www/vhosts/example.com/svn/hooks/post-commit

If there is no dos2unix command, then try opening the publish-commit hook within an editor that allows you alter line being (on Home windows, In my opinion that Notepad+ will, but I am not really a Home windows guy) like Emacs, TextMate, or Vim, and take away the additional character in the finish from the first line (and most likely, other lines).