2011/9/3 douglas barrett <dbarret...@netscape.net>: > >>> apache@X hooks]$ pwd >>> Y/hooks >>> >>> [apache@X hooks]$ ls -l pre-revprop-change >>> -rwxr-xr-x. 1 apache apache 2890 Sep 2 08:39 >>> pre-revprop-change << so I seem to have a valid hook >>> >>> [apache@irvine hooks]$ tail -14 pre-revprop-change >>> REPOS="$1" >> >> >>"tail" does not show the whole file. What happens if you try to run >>this script? ( ./pre-revprop-change ) >> >>Do you have shebang line ( #!/bin/sh ) at the top of the file >>and does the shell mentioned there (/bin/sh or whatever) exist on your >>server and is usable by that user? >> > > Konstantin, > > thank you for taking the time to respond. You are right about tail of > course. I used this command because my pre-revprop-change file was > created from pre-revprop-change.tmpl which begins with copious comments > which aren't germane. > > The file does in fact contain the opening magic number and interpreter > path. > > [apache@X hooks]$ head -1 pre-revprop-change > #!/bin/sh > > { > As a side point the "shebang" is not required for a shell script > to run. > > [apache@X tmp]$ echo "echo \$*" > ./Echo > [apache@X tmp]$ cat ./Echo > echo $* > [apache@X tmp]$ chmod u+x ./Echo > [apache@X tmp]$ ./Echo "you don't need a magic number" > you don't need a magic number > }
You are executing it from within a shell. I wonder whether it is also true when executing it with C API, > If I run the script it behaves as intended. > > [apache@X hooks]$ ls /tmp/tmp > ls: cannot access /tmp/tmp: No such file or directory > [apache@X hooks]$ ./pre-revprop-change > [apache@X hooks]$ ls /tmp/tmp > /tmp/tmp Good. And what is the value of its exit status ( echo "$?" IIRC ) At least "exit code 255" message means that subversion sees the file and tries to start it. (I wonder why it is "255"). You may try to print something to ">&2" so that this failure wouldn't be "with no output." I wonder whether your installation of apache uses chroot to limit access to file system. You may try to use a C program instead of a script. There should be a program named "true" in your system - you may try replacing the script with a copy of that program. Best regards, Konstantin Kolinko