nginx – failed (13: Permission denied)

In a fresh CENTOS, while installing & testing nginx i’v faced the following error..

2019/10/10 17:54:11 [crit] 18960#0: *1 stat() "/home/www/html/index.php" failed (13: Permission denied), client:, server:, request: "GET /index.php HTTP/1.1", host: ""

This is how I’v solved.

chcon -R -t httpd_sys_content_t /home/www/html/

More readings

2 thoughts on “nginx – failed (13: Permission denied)


    Thank you so much for this! Been trying to get my setup to work… I’ve never needed to do this before, so I’m not sure why I suddenly need to, but oh well. I was just trying to move my server to CentOS 8 from CentOS 7 and ran into a wall where NGINX kept saying this error even though I desperately changed the NGINX user to root.
    -Fake name and email btw, just wanted to say thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.