Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered

Posted May 5, 2017 274.9k views
Control Panels

i just updated my website and the was the error


You don’t have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

is there a way i can resolve this

1 comment
  • I’m currently having an issue with this on my WordPress website. In addition, it eventually takes down everything except for the plesk admin panel, even my mail server.

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.

4 answers

There is a possibility of misconfiguration after the website update – that is, wrong file permissions are restricting the server to access the files. You should check the File permission of your web root directory which contained the index.html or index.php files.

For diagnostic correction, allow permission for all by typing:

sudo chmod -R 777 /path/to/index.html
and then;
sudo chown -R [username]:[group] /path/to/index.html

where username is the ‘username’ you use to login to the Droplet, and group will be www-data if your web server is Apache.

Please let us know if this tip solves your problem. If not. then we will have to correct the 'ErrorDocument’ attribute in apache configuration file or the attribute 'AllowOverride’ in .htaccess file.

edited by MattIPv4

Hi @lavgee

When the website was updated, it probably removed some files - including index.php or index.html of the directory you’re trying to view, which is why you get that error, since directory listing is not something that is enabled by default.

Which website system do you use?

You can see more detailed errors in the error log, which is located in:
If using Apache, it’s default location is /var/log/apache/error.log
If using Nginx, it’s default location is /var/log/nginx/error.log

I had the same issue even though I set correct permission 775 for folders and 644 for files
I assume your web root folder is /home
Please try this command:
chcon -R -t httpdsyscontent_t /home

It works for me and now the web root folder is “home”, not the default /usr/share/nginx/html/

Thanks for your information, so helpfull.

Submit an Answer