Ferrets家的Wordpress

杂记

strace

因权限造成lighttpd无法启动

2012年3月20日 by Ferrets Leave a Comment

最近不知道为什么lighttpd又跑不动了(当然不是VPS上的,而是路由上的) ,运行

lighttpd -f /etc/lighttpd/lighttpd.conf -D

得到了下面这堆奇怪的结果

2012-3-20 13:55:54: (log.c.172) server started
2012-3-20 13:55:54: (mod_fastcgi.c.1087) the fastcgi-backend /usr/bin/php-fcgi failed to start:
2012-3-20 13:55:54: (mod_fastcgi.c.1091) child exited with status 13 /usr/bin/php-fcgi
2012-3-20 13:55:54: (mod_fastcgi.c.1094) If you're trying to run your app as a FastCGI backend, make sure you're using the FastCGI-enabled version.
If this is PHP on Gentoo, add 'fastcgi' to the USE flags.
2012-3-20 13:55:54: (mod_fastcgi.c.1398) [ERROR]: spawning fcgi failed.
2012-3-20 13:55:54: (server.c.928) Configuration of plugins failed. Going down.

接着就无法启动了……

我擦勒,不带这样玩的啊喂,这种莫名其妙的东西是什么啊,到底是什么问题你说一下啊。不得已,只得在网上不断的搜索,都没有相关的资料……最后从某个英文的网站找到了一个指引(明灯啊!)strace

大概是一个调试的东东,在opkg的info里面的介绍是“A useful diagnostic, instructional, and debugging tool. Allows you to track whatsystem calls a program makes while it is running.”

接着我根据那位大神所说的,运行了一次

strace -ff lighttpd -D -f /etc/lighttpd/lighttpd.conf

结果出来了一大串一大串文字,刷屏了,而且看不到头。不过看到了一个很重要的信息

运行/usr/bin/php-fcgi的时候出现了“permission denied”。嗯?有问题?权限的话是755,应该没问题啊,尝试直接用root来运行lighttpd,报告说不能用root来运行。于是又新建了一个www-data的用户来运行,在用su切换账户的时候发现问题了。这个问题之前也提到过,于是就顺手改了过来。接着切换过去一运行/usr/bin/php-fcgi,没问题了。再运行lighttpd,也没问题了……

这可真蛋疼啊,明明之前的版本都可以直接用其他用户来运行的,现在的话还有自己动手。

Posted in: Linux, OpenWrt, 自建服务 Tagged: Lighttpd, OpenWrt, strace

搜索站点

日历

2023年 3月
一二三四五六日
 12345
6789101112
13141516171819
20212223242526
2728293031 
« 1月    

分类

  • Android
  • docker
  • Linux
  • OpenWrt
  • OPNsense
  • Proxmox
  • RaspberryPi
  • RouterOS
  • Windows
  • 吐槽
  • 未分类
  • 生活
  • 网络
  • 自建服务

近期文章

  • 使用OPNsense来保护内网的服务
  • Mikrotik RB750Gr3优化配置,跑(差点)满千兆
  • 用smartdns来防治DNS污染
  • Proxmox中LXC容器中docker调用宿主机的显卡加速
  • Linux上iptables端口触发拦截
  • 通过DHCP指定mtu
  • openwrt 国内镜像源
  • 为RDP启用显卡加速,提升远程桌面效果
  • 为proxmox启用intel核显的虚拟化
  • windows无法解析域名

友链

  • ntzyz's space
  • Openwrt中文论坛
  • SNGR
  • Trevikids行止由心
  • 煎蛋

归档

管理

  • 登录
  • 条目feed
  • 评论feed
  • WordPress.org

Copyright © 2023 Ferrets家的Wordpress.

Omega WordPress Theme by ThemeHall