部署 VPS 上 Passenger 出现问题,权限不对??

tiseheaini · 2012年10月04日 · 最后由 tiseheaini 回复于 2012年10月04日 · 3114 次阅读

在 VPS 上部署出现了错误 /var/log/apache2/error.log

[ pid=1600 thr=3025124160 file=ext/apache2/Hooks.cpp:884 time=2012-10-04 01:19:30.536 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/tiny/coolxueyuan': Could not read from the spawn server: Connection reset by peer (104)
  Backtrace:
     (empty)
*** Passenger ERROR (ext/common/ApplicationPool/../SpawnManager.h:220):
Could not start the spawn server: /home/tiny/.rvm/wrappers/ruby-1.9.2-p318/rubyk: No such file or directory (2)
*** Passenger ERROR (ext/common/ApplicationPool/../SpawnManager.h:220):
Could not start the spawn server: /home/tiny/.rvm/wrappers/ruby-1.9.2-p318/rubyk: No such file or directory (2)
[ pid=1601 thr=3008338752 file=ext/apache2/Hooks.cpp:884 time=2012-10-04 01:19:52.617 ]: Unexpected error in mod_passenger: Cannot spawn application '/home/tiny/coolxueyuan': Could not read from the spawn server: Connection reset by peer (104)
  Backtrace:
     (empty)

用户资料

root@ubuntu:~# id tiny
uid=1000(tiny) gid=1000(tiny) groups=1000(tiny)

我是按照 http://happycasts.net/episodes/38上创建的用户 用的 http://happycasts.net/episodes/18 的开发环境 useradd tiny --ingroup sudo 后来发现不对 然后新建的用户组 groupadd tiny 再将用户的用户组信息改了 usermod -g 1000 -G tiny 重启 apache 和 Passenger 后还是一样的错误。帮忙看看情况 @Rei @xds2000 @zw963 @happypeter

把用户添加到 Apache 和 Passenger 启动的用户组试试再,再改改 web 目录的组权限试试

#1 楼 @cxh116 在本地没有这种情况,Ubuntu 的桌面系统 会自动建立好 用户和相应的用户组 服务器系统只有一个 root,无奈中

问题 解决了 我把 Apache Passenger 删掉,然后重新来了一遍,解决了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号