I have been wrestling with this on my droplet and cannot see why I keep getting this error and the error in the /var/log/nginx/error.log below. Any help appreciated.
signupadmin@signup:~$ sudo tail -f /var/log/nginx/error.log [sudo] password for signupadmin: 2024/01/06 12:46:35 [error] 2334#2334: *101 “/home/signupadmin/exhibit_website/ExhibitOnePage/index.html” is forbidden (13: Permission denied), client: 87.236.176.204, server: 143.198.116.69, request: “GET / HTTP/1.1”, host: “143.198.116.69”
2024/01/06 12:50:06 [error] 2334#2334: *102 “/home/signupadmin/exhibit_website/ExhibitOnePage/index.html” is forbidden (13: Permission denied), client: 192.241.199.83, server: 143.198.116.69, request: “GET / HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:02:06 [error] 2334#2334: *103 open() “/home/signupadmin/exhibit_website/ExhibitOnePage/.env” failed (13: Permission denied), client: 57.129.23.166, server: 143.198.116.69, request: “GET /.env HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:02:06 [error] 2334#2334: *104 “/home/signupadmin/exhibit_website/ExhibitOnePage/index.html” is forbidden (13: Permission denied), client: 57.129.23.166, server: 143.198.116.69, request: “POST / HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:04:19 [error] 2334#2334: *105 “/home/signupadmin/exhibit_website/ExhibitOnePage/index.html” is forbidden (13: Permission denied), client: 185.134.22.149, server: 143.198.116.69, request: “GET / HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:04:20 [error] 2334#2334: *106 open() “/home/signupadmin/exhibit_website/ExhibitOnePage/systembc/password.php” failed (13: Permission denied), client: 185.134.22.149, server: 143.198.116.69, request: “GET /systembc/password.php HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:04:21 [error] 2334#2334: *107 open() “/home/signupadmin/exhibit_website/ExhibitOnePage/Ep1v” failed (13: Permission denied), client: 185.134.22.149, server: 143.198.116.69, request: “GET /Ep1v HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:04:23 [error] 2334#2334: *108 open() “/home/signupadmin/exhibit_website/ExhibitOnePage/GWqN” failed (13: Permission denied), client: 185.134.22.149, server: 143.198.116.69, request: “GET /GWqN HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:05:47 [error] 2334#2334: *110 “/home/signupadmin/exhibit_website/ExhibitOnePage/index.html” is forbidden (13: Permission denied), client: 97.147.10.55, server: 143.198.116.69, request: “GET / HTTP/1.1”, host: “143.198.116.69”
2024/01/06 13:05:48 [error] 2334#2334: *110 open() “/home/signupadmin/exhibit_website/ExhibitOnePage/favicon.ico” failed (13: Permission denied), client: 97.147.10.55, server: 143.198.116.69, request: “GET /favicon.ico HTTP/1.1”, host: “143.198.116.69”, referrer: “http://143.198.116.69/”
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya @andrewchalk,
The error messages you’re seeing in your NGINX error log are related to permission issues on your server. Specifically, NGINX does not have the necessary permissions to access the files in your specified directory (
/home/signupadmin/exhibit_website/ExhibitOnePage
). This is indicated by the error message “Permission denied”. Here are steps to troubleshoot and potentially resolve this issue:www-data
user or similar, so this user needs to have read access to the files.This command will show the permissions of the files. You’re looking for something like
-rw-r--r--
for files anddrwxr-xr-x
for directories.Change Ownership or Permissions: If the permissions are incorrect, you can change them. You can either change the ownership of the files to the NGINX user (usually
www-data
or similar) or adjust the permissions so that other users can read the files.To change ownership:
To change permissions:
Check SELinux Contexts: If you’re running a system with SELinux enabled (like CentOS or RHEL), ensure that the files have the correct SELinux contexts. Use
ls -Z
to check andchcon
orrestorecon
to adjust contexts.Check NGINX Configuration: Ensure that your NGINX configuration file is correctly pointing to the right root directory and the server has permission to access it.