nginx 报错 open() "fastcgi_temp" failed (13: Permission denied) 的解决办法
查看 nginx 日志,发现有报错信息:
|
1 |
2019/07/16 17:34:42 [crit] 4397#0: *349 open() "/fastcgi_temp/5/00/0000000005" failed (13: Permission denied) while reading upstream |
查看对应目录的权限,发现所属用户是 nobody,而实际运行 nginx 的是 wwwuser:
|
1 2 3 4 |
root 1842 0.0 8.5 410716 332500 ? Ss 17:10 0:01 nginx: master process /usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf wwwuser 4397 0.0 8.5 412288 332828 ? S 17:33 0:00 nginx: worker process wwwuser 4398 0.0 8.5 411776 332360 ? S 17:33 0:00 nginx: worker process wwwuser 4399 0.0 8.5 412800 330336 ? S 17:33 0:00 nginx: cache manager process |
因此问题原因应该是:nginx 最初始时以 ... 阅读更多