nginx php 开启 SELinux 提示 Forbbide
作者:
紅塵忘 | 来源:发表于
2018-09-19 13:44 被阅读21次
- 查看 nginx
error.log
查看到 index.php premission dead
- 查看 SELinux log
/var/log/aduit.log
提示 denied { open } scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file
- 查看 nginx 默认文件 Security context
ls -Z /usr/share/nginx/html
显示
root root system_u:object_r:httpd_sys_content_t:s0 index.html
- 修改对应权限
chcon -R -u system_u -t httpd_sys_content_t filePath
本文标题:nginx php 开启 SELinux 提示 Forbbide
本文链接:https://www.haomeiwen.com/subject/dshinftx.html
网友评论