duanchoupo1104 2014-06-26 02:38
浏览 92

用于运行`git pull`的Apache的Apache权限

I'm running in trouble with my new VPS. I created a file pull.php with this code in my GIT folder:

<?php
$output = shell_exec('git pull');
echo "<pre>$output</pre>";
?>

It was working fine on my shared hosting but on my VPS it's return null and no 'pull' command executed. When I change the command 'git pull' to 'git status' it's show result :

On branch master Your branch is up-to-date with 'origin/master'.

Untracked files: (use "git add ..." to include in what will be committed)

info.php pull.php test.txt

nothing added to commit but untracked files present (use "git add" to track)

My folder chmod to 777 and php seems can write on it properly. 'git pull' on SSH's fine. My server : Ubuntu 14.x, Apache2, php5

I would very much appreciate any help!

  • 写回答

3条回答 默认 最新

  • dropbox1111 2014-06-26 02:41
    关注

    I find it weird you get no output nothing...

    do you have root access?

    try as root in the right folder: sudo -u apache git pull

    see if you get any output then.

    评论

报告相同问题?

悬赏问题

  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题