I am trying to run php script via execute shell in Jenkins but it seems i am missing something.
here is my command in execute shell of Jenkins
#!/usr/bin/php
php /home/admin/reports/test.php"
I am not getting any error in console output.
and when i try these commands:
#!/bin/bash
php /home/admin/reports/test.php"
then I get error which says failed to open stream: Permission denied in
/home/admin/reports/test.php"
.
Jenkins, with default installation, will be run under jenkins
user. That user has no access to your /home/admin
home directory. The Permission denied
is pretty self-explanatory.
jenkins
user read access to /home/admin
(not recommended)/home/jenkins
directory (not best solution either)