HomeLinuxYou do not have permission to entry / on this server" Error

You do not have permission to entry / on this server” Error


Apache net server is without doubt one of the hottest and extensively used open-source net servers because of its stability and reliability. The net server instructions an enormous market, particularly in webhosting platforms.

Be that as it might, you might get a “Forbidden – You don’t have permission to entry / on this server” error in your browser after establishing your web site. It’s fairly a typical error and a great chunk of customers have skilled it whereas testing their web site. So what is that this error?

Demystifying the Forbidden Error

Additionally known as the 403 Forbidden error, Apache’s ‘Forbidden Error’ is an error that’s displayed on an internet web page if you end up making an attempt to entry an internet site that’s restricted or forbidden. It’s normally splashed on the browser as proven.

Apache Forbidden Error
Apache Forbidden Error

Moreover, the error can manifest in a number of methods on the browser as indicated under:

  • HTTP Error 403 – Forbidden
  • Forbidden: You don’t have permission to entry [directory] on this server
  • 403 Forbidden
  • Entry Denied You don’t have permission to entry
  • 403 forbidden requests forbidden by administrative guidelines

So what causes such errors?

The ‘403 Forbidden Error‘ happens as a result of following primary causes:

1. Incorrect File / Listing Permissions

This error may be triggered resulting from incorrect file/folder permissions on the webroot listing. If the default file permissions should not adjusted to grant customers entry to the web site recordsdata, then the probabilities of this error popping on an internet browser are excessive.

2. Misconfiguration of the Apache Configuration Information

This error can be attributed to a misconfiguration of one of many Apache configuration recordsdata. It may very well be an incorrect parameter that has been included or lacking directives within the configuration file.

Fixing the ‘403 Forbidden Error’

When you have encountered this error, listed here are a number of steps that you would be able to take to treatment this.

1. Alter File Permissions & Possession of the Webroot Listing

Incorrect file permissions & listing possession are identified to limit entry to web site recordsdata. So, firstly, be sure you assign the file permissions recursively to the webroot listing as proven.

The webroot listing ought to at all times have EXECUTE permissions and the index.html file ought to have READ permissions.

$ cd /path/to/webroot/listing 
$ sudo discover . -type d -exec chmod 755 {} ;
$ sudo discover . -type f -exec chmod 644 {} ;

The above discover command is used to seek out all directories (folders) and recordsdata inside the present listing (.) and set their permissions to 755 (directories) and 644 (recordsdata).

Moreover, modify the possession of recordsdata and directories to a selected person (tecmint) and group www-data or apache utilizing the chown command as proven.

$ sudo chown -R tecmint:apache .
Set Permissions on Apache Root Directory
Set Permissions on Apache Root Listing

Lastly, reload or restart the Apache webserver for the adjustments to take impact.

$ sudo systemctl restart apache2
OR
$ sudo systemctl restart httpd

If this doesn’t resolve the problem, proceed to the following step:

2. Alter Directives in Apache Important Configuration File

If you’re on Debian-based Linux, in Apache’s primary configuration file /and so forth/apache2/apache2.conf, guarantee that you’ve got this block of code:

<Listing />
        Choices FollowSymLinks
        AllowOverride None
        Require all denied
</Listing>

<Listing /usr/share>
        AllowOverride None
        Require all granted
</Listing>

<Listing /var/www/>
        Choices Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Listing>

Save and exit and thereafter, restart the Apache.

If you’re operating Apache on RHEL-based distributions / CentOS methods, be sure that you chill out entry to the /var/www listing within the /and so forth/httpd/conf/httpd.conf primary Apache configuration file.

<Listing "/var/www">
    AllowOverride None
    Require all granted
</Listing>

Then save all of the adjustments and reload Apache.

$ sudo systemctl reload apache2
OR
$ sudo systemctl reload httpd

If after making an attempt all these steps you’re nonetheless getting the error, then please test the configuration of your digital host recordsdata.

We’ve detailed articles on how one can configure the Apache Digital host file on:

I hope that the steps offered have helped you clear the 403 error.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments