Running php script via Jenkins and Execute shell

779 views
Skip to first unread message

Ondřej Korouš

unread,
Feb 15, 2015, 4:21:14 AM2/15/15
to jenkins...@googlegroups.com

I am running job in Jenkins with Execute shell like this

whoami

php /path/to/vendor/phpunit/phpunit/phpunit --log-junit /path/to/results/phpunit/phpunit.xml /path/to/tests/SeleniumTest.php

But it failed with php error 'failed to open stream: Permission denied in ...' so its trying to include file and doesnt have permision to it.

When i switch to jenkins user (su - jenkins) and run exactly same command then it works, just from jenkins it doesnt have permission.

Anyone have a clue how to fix it?

Daniel Beck

unread,
Feb 15, 2015, 6:47:41 AM2/15/15
to jenkins...@googlegroups.com
Compare output of `id`, it's possible that the Jenkins process does not have all group memberships.
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b9b66891-874e-463b-bf59-450166c7e7f9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Ondřej Korouš

unread,
Feb 15, 2015, 8:09:10 AM2/15/15
to jenkins...@googlegroups.com, m...@beckweb.net
I dont know what id do you mean. I have whoami on the start that saying its jenkins user

Dne neděle 15. února 2015 12:47:41 UTC+1 Daniel Beck napsal(a):
Reply all
Reply to author
Forward
0 new messages