On 6/27/2014 6:42 AM, Korte, Michael Johannes wrote:
> Hello Nico Kadel-Garcia,
>
> I still could not fix the problem. I did the following checks:
> I did a checkout in the server with user "www-data" on file level:
> www-data_at_artifactory:/tmp/Michael/co_www-data/sbox/trunk$ svn co file:///var/subversion/repos17/sbox/trunk
>
> Then the checkin can start the hook script (post-commit) wirh any problem.
>
> But when I do checkout via http Url (usinge Apache WebDav) (of course also on the server
> root@artifactory:/tmp/Michael/co_http/sbox/trunk# svn co http://172.25.22.94/sbox/trunk/
>
> During the checkin no hook scripts can be called:
> root_at_artifactory:/tmp/Michael/co_http/sbox/trunk/trunk# svn ci -m "aaa"
> Anmeldebereich: <http://172.25.22.94:80> Subversion Sandbox Repository
> Passwort für »michael.korte«:
> Sende Test_commit.txt
> Ãbertrage Daten .
> Revision 308 übertragen.
>
> Warnung: Failed to start '/var/subversion/repos17/sbox/hooks/post-commit' hook
>
> It seems that the hook script can not be executed, when it is started via apache server, if it has execute permission and owner www-data.
>
> Is there any possibility to specify that apache can execute a script?
>
> I linked the subversion Repository under /var/www/subversion/repos17/sbox but also this didn't help (Failed to start '/var/www/subversion/repos17/sbox/hooks/post-commit' hook).
>
> I tried also with oder deny, allow in the apache Konfiguration file but also this didn't help. Is there any possibility to trace/debug how subversion calls a hook script exactly.
>
> That's all for today. May be I have on Monday a good idea.
>
What user is the Apache server running as? This looks like the Apache
server is not running as root or www-data. What do the following lines
from httpd.conf have in them?
User
Group
The scripts need to be executable by this user. On my server, for
example, both lines say "apache" so my scripts need to be owned by
"apache:apache".
P.S. Running Apache as root is not a good idea; I just want to confirm
which non-privileged account is being used.
--
David Chapman dcchapman_at_acm.org
Chapman Consulting -- San Jose, CA
Software Development Done Right.
www.chapman-consulting-sj.com
Received on 2014-06-27 17:37:51 CEST