Monthly Archives: October 2019

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: 94.61.69.69, server: 51.158.69.69, request: "GET /index.php HTTP/1.1", host: "51.158.69.69"

This is how I’v solved.

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

More readings
https://stackoverflow.com/questions/22586166/why-does-nginx-return-a-403-even-though-all-permissions-are-set-properly#answer-26228135