刚设置了进程的user属性,发现写日志和加载Event文件都报错,换回root就一切正常了。
系统:
Linux version 3.10.0-514.6.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Jan 18 13:06:36 UTC 2017
PHP:PHP 5.4.16 (cli) (built: Nov 6 2016 00:29:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
循环报以下错误
Warning: file_put_contents(/root/cache/thrift_worker.log): failed to open stream: Permission denied in /root/workerman/workerman/Worker.php on line 1350
worker exit with status 65280
worker exit with status 65280
PHP Fatal error: Class '\Workerman\Events\Event' not found in /root/workerman/workerman/Worker.php on line 1504
已经确认thrift_worker.log已经生成,并写了log。
估计是fork的子进程也要写log,产生的问题。
thrift_worker.log设置0666的权限仍然不行。
估计是user用户没有读取php文件的权限,导致加载不了php文件
加了权限啊,chmod a+x,而且还加了组。