Apache permission for php to run `git pull` -
i'm running in trouble new vps. created file pull.php
code in git folder:
<?php $output = shell_exec('git pull'); echo "<pre>$output</pre>"; ?>
it working fine on shared hosting on vps it's return null , no 'pull' command executed. when change command 'git pull' 'git status' it's show result :
on branch master branch up-to-date 'origin/master'.
untracked files: (use "git add ..." include in committed)
info.php pull.php test.txt
nothing added commit untracked files present (use "git add" track)
my folder chmod 777 , php seems can write on properly. 'git pull' on ssh's fine. server : ubuntu 14.x, apache2, php5
i appreciate help!
i find weird no output nothing...
do have root access?
try root in right folder: sudo -u apache git pull
see if output then.
Comments
Post a Comment