nginx php 开启 SELinux 提示 Forbbide

2018-09-19  本文已影响21人  紅塵忘
  1. 查看 nginx error.log查看到 index.php premission dead
  2. 查看 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
  3. 查看 nginx 默认文件 Security context ls -Z /usr/share/nginx/html显示
    root root system_u:object_r:httpd_sys_content_t:s0 index.html
  4. 修改对应权限chcon -R -u system_u -t httpd_sys_content_t filePath
上一篇下一篇

猜你喜欢

热点阅读