Find out the web server user Show
open up terminal and type lsof -i tcp:80 This will show you the user of the web server process Here is an example from a raspberry pi running debian: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME apache2 7478 www-data 3u IPv4 450666 0t0 TCP *:http (LISTEN) apache2 7664 www-data 3u IPv4 450666 0t0 TCP *:http (LISTEN) apache2 7794 www-data 3u IPv4 450666 0t0 TCP *:http (LISTEN)The user is www-data If you give ownership of the web files to the web server: chown www-data:www-data -R /opt/lamp/htdocsAnd chmod 755 for good measure: chmod 755 -R /opt/lamp/htdocsLet me know how you go, maybe you need to use 'sudo' before the command, i.e. sudo chown www-data:www-data -R /opt/lamp/htdocs if it doesn't work, please give us the output of: ls -al /opt/lamp/htdocs
The 403 Forbidden error is an HTTP status code that means that access to the page or resource you were trying to reach is blocked for some reason. What Causes 403 Forbidden ErrorsDifferent web servers report 403 Forbidden errors in different ways, the majority of which we've listed below (see the Common 403 Error Messages section). Occasionally a website owner will customize the site's error, but that's not too common. These errors are caused by issues where you're trying to access something that you don't have permission for. The error is essentially saying "Go away and don't come back here" because the server's access permissions indicate that you’re truly not allowed access or the permissions are actually improperly set up and you’re being denied access when you shouldn’t be. How to Fix the 403 Forbidden ErrorDifferent website designs can produce 403 errors that might make them seem different from site to site but, overall, they are pretty much the same thing. Often, there's not much you can do because the error typically stems from the development and design of the site. Occasionally, though, it could be a problem on your end. Here are a few things to try so you can confirm it's not your side of the connection causing the problem.
How the 403 Error Can Appear on Different SitesThese are the most common incarnations of 403 Forbidden errors:
The error displays inside the browser window, just as web pages do, and like all errors of this type, it can be seen in any browser on any operating system. These errors, when received while opening links via Microsoft Office programs, generate the message Unable to open [url]. Cannot download the information you requested inside the Office software. Windows Update might also report an HTTP 403 error but it will display as error code 0x80244018 or with the following message: WU_E_PT_HTTP_STATUS_FORBIDDEN. Microsoft IIS web servers provide more specific information about the cause of 403 Forbidden errors by suffixing a number after the 403, as in HTTP Error 403.14 - Forbidden, which means Directory listing denied. Similar Errors to 403 ForbiddenThe following messages are also client-side errors and so are related to the 403 Forbidden error: 400 Bad Request, 401 Unauthorized, 404 Not Found, and 408 Request Timeout. Several server-side HTTP status codes also exist, like the popular 500 Internal Server Error, among others that you can find in our list of HTTP status code errors. FAQ
Thanks for letting us know! How do you fix 403 forbidden access to this resource on the server is denied?In this post, we looked at five main ways you can fix the 403 Forbidden error using an SFTP client like FileZilla or the file manager in your hosting account: Change your file permissions. Deactivate your plugins. Delete and restore the .
What are the reasons for 403 forbidden?The 403 Forbidden Error happens when the web page (or another resource) that you're trying to open in your web browser is a resource that you're not allowed to access. It's called a 403 error because that's the HTTP status code that the webserver uses to describe that kind of error.
How do I fix Nginx error?Basic Nginx troubleshooting. Search for syntax errors or warnings in the configuration. ... . Check that Nginx is running. ... . Verify that the ports are open and the service is listening. ... . Check if Nginx processes requests. ... . Check the logs. ... . Check permissions. ... . Reload the service. ... . Enable de debug mode.. |