Forbidden – You don’t have permission to access / on this server Error

Apache web server is one of the most popular and widely used opensource web servers , especially in the web hosting platforms.

Be that as it may, you may get a “Forbidden – You don’t have permission to access / on this server” error on your browser after setting up your website. It’s quite a common error and users have experienced it while testing their site. So what it this error?

Forbidden Error

It is also referred to as 403 Forbidden error, Apache’s ‘Forbidden Error’ is an error that is displayed on a web page when you are attempting to access a website that’s restricted or forbidden.

Apache Forbidden Error
Apache Forbidden Error

Additionally, the error can shown in several ways on the browser as indicated below:

  • HTTP Error 403 – Forbidden
  • Forbidden: You don’t have permission to access [directory] on this server
  • 403 Forbidden
  • Access Denied You don’t have permission to access
  • 403 forbidden request forbidden by administrative rules

The ‘403 Forbidden Error‘ occurs due to the following main reasons:

1. Incorrect File / Directory Permissions

This error can be triggered due to incorrect file/folder permissions on the webroot directory. If the default file permissions are not adjusted to grant users access to the website files, then chances of this error popping on a web browser are high.

2. Misconfiguration of the Apache Configuration Files

This error can also be attributed to a misconfiguration of one of the Apache configuration files. It could be an incorrect parameter that has been included or missing directives in the configuration file.

Fixing the ‘403 Forbidden Error’

If you have encountered this error, here are a few steps that you can take to remedy this.

1. Adjust file permissions & ownership of the webroot directory

Incorrect file permissions & directory ownership are known to restrict access to website files. So, firstly, be sure to assign the file permissions recursively to the webroot directory as shown. The webroot directory should always have EXECUTE permissions and the index.html file should have READ permissions.

$ sudo chmod -R 775 /path/to/webroot/directory

Additionally, adjust the directory ownership as shown:

$ sudo chown -R user:group /path/to/webroot/directory

Where the user is the regular logged-in user and the group is www-data or apache.

The finally, reload or restart the Apache webserver for the changes to take effect.

$ sudo systemctl restart apache2

If this does not resolve the issue, proceed to the next step:

2. Adjust directives in Apache main configuration file

In Apache’s main configuration file /etc/apache2/apache2.conf, ensure that you have this block of code:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

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

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

Save and exit and thereafter, restart the Apache.

If you are running Apache on RHEL / CentOS systems, ensure that you relax access to the /var/www directory in the /etc/httpd/conf/httpd.conf main Apache configuration file.

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

Then save all the changes and reload Apache.

$ sudo systemctl restart apache2

Thank you for reading this article.

Was this helpful?

3 / 8

Leave a Reply 57

Your email address will not be published. Required fields are marked *


WonKERMpX

WonKERMpX

Thanks

sFMtyjpHSdEnf

sFMtyjpHSdEnf

Very Well!

brass gold mixer tap

brass gold mixer tap

I have read so many articles about the blogger lovers except this post is actually a nice article,
keep it up.

Kitchen Tap Black

Kitchen Tap Black

Pretty nice post. I just stumbled upon your blog
and wanted to say that I have truly enjoyed browsing your blog posts.

In any case I will be subscribing to your rss feed and I hope you write again very
soon!

CBDes

CBDes

I’ve been browsing online more than three hours today, yet I never found any interesting article like yours.
It is pretty worth enough for me. In my opinion, if all web owners
and bloggers made good content as you did, the internet will be a
lot more useful than ever before.

Gummies

Gummies

Hello, after reading this awesome article i am as well highlighted to share with colleagues.

Jackie

Jackie

Thanks bro!

yeYzrijaNOG

yeYzrijaNOG

Thanks a lot

VIbFhPvK

VIbFhPvK

Thanks.

deltam

deltam

Thanks for sharing your thoughts.

Areaban

Areaban

My spouse and I stumbled over here different
web page and thought I might as well check things out.
I like what I see so i am just following you.
Look forward to looking into your web page repeatedly.

ublKIGLcMs

ublKIGLcMs

Great work!

CcrSaNBDEFs

CcrSaNBDEFs

Nice work, keep up the nice work fellows.

Angelika

Angelika

Hello, I believe and I’m trying to find issues to improve my site!I suppose its good enough to make use of a
few of your ideas!!

KIuMsjFe

KIuMsjFe

Fantastic Article!

lnhBgztFox

lnhBgztFox

sjLdaDbBvpR

condhandbaza

condhandbaza

Give thanks you for piece of writing this. Truly pauperism this

thataaps

thataaps

I got this web site from my friend who shared with me concerning
this web page and at the moment this time I am browsing this web page and
reading very informative articles here.

OANrwuHLMmy

OANrwuHLMmy

delighted to glance at this blog posts which contains tons of valuable information

gameare

gameare

Pretty! This has been an incredibly wonderful post.
Thank you for supplying these details.

orames

orames

Amazing issues here. I’m very happy to peer your article. Thank you
a lot and I am having a look ahead to contact you. Will you please drop
me a e-mail?

interior

interior

Its really a nice post!

uibTCzDkWHmLj

uibTCzDkWHmLj

It was really informative. Your site is useful.
Thank you for sharing!

robinet noir

robinet noir

Thank you for composition this. Genuinely need this

wysocki

wysocki

I really enjoyed the standard information an individual provided.

Sink Drain

Sink Drain

I really enjoyed it. Its a awesome post

zovrelioptor

zovrelioptor

Thank you, I’ve just been searching for info about this subject for ages and yours is the best I have discovered till now.

RolkcYhtuifCqw

RolkcYhtuifCqw

You have performed a formidable activity and our whole
friends will likely be grateful to you.

WmEXhu

WmEXhu

Actually awesome post.

Chang

Chang

Normally I do not read article on blogs, but I would like to say that this write-up very compelled me to take a look at and do
so! Your writing taste has been surprised me. Thanks, quite nice post.

ClyWHpgeO

ClyWHpgeO

Wonderful beat ! I would like to apprentice whilst you amend your
website, how could i subscribe for a blog site? The account aided me a applicable deal.

zortilo nrel

zortilo nrel

I just couldn’t depart your website before suggesting that I really enjoyed the standard info a person provide for your visitors? Is going to be back often in order to check up on new posts

GLnfkqTbXg

GLnfkqTbXg

It is going to be a regular visitor for a lengthy time.

Halina

Halina

I am in fact glad to read this weblog posts which consists of tons of valuable facts, thanks
for providing these kinds of statistics.

Mahmud Ghazni

Mahmud Ghazni

Hey, It’s me Mahmud Ghazni. Recently your website caught my attention while searching for similar domain names. After entering the website, It seems that your website superb.

Mahmud Ghazni

Mahmud Ghazni

Hey, It’s Mahmud here. Recently your website caught my attention.

Nelly

Nelly

I need to thank you, since it’s really difficult to find great info like your blog.

해외안전놀이터

해외안전놀이터

Every weekend i used to go to see this site, because i want enjoyment

밤알바

밤알바

I savor, result in I found just what I was looking for.

You have ended my 4 day long hunt! God Bless you man. Have a
great day. Bye

텐카페알바

텐카페알바

I just couldn’t depart your website before suggesting that I really loved the standard information a person supply to your visitors?
Is gonna be again incessantly to investigate cross-check new posts

judine

judine

I appreciate you sharing this blog article.Really thank you! Much obliged.

업소알바

업소알바

Thank you, I have recently been searching for info approximately this subject for
a while and yours is the best I’ve came upon till now.
However, what in regards to the conclusion? Are you
certain concerning the source?

che funres

che funres

Thanks very nice blog!

dopedersen

dopedersen

It’s an awesome article designed for all the internet people; they will get advantage from it I am sure.

psuite

psuite

Hi there! I just wish to give you a big thumbs up for the great info you have got right here on this post. I am coming back to your blog for more soon.

busupher

busupher

What a stuff of in-ambiguity and preserves of precious familiarity!!!

인천결혼박람회

인천결혼박람회

Article writing is also a excitement, if you know then you can write or else it is difficult to write.

lantale clism

lantale clism

Hello my loved one! I want to say that this post is amazing, nice written and come with approximately all vital infos. I’d like to look extra posts like this.

emov bang

emov bang

Really high quality content. Thanks for sharing.

Bugle Rev

Bugle Rev

I do not even know how I ended up right here, however I believed this publish used to be good. I do not realize who you might be but definitely you are going to a well-known blogger should you are not already. Cheers!

lnfogéran

lnfogéran

Great post. I am facing a few of these issues as well..

Supep forcin

Supep forcin

Say, you got a nice blog article.Really thank you! Fantastic.

웨딩박람

웨딩박람

Superb, what a blog it is! This blog gives valuable information to us, keep it up.

Delitour

Delitour

I truly appreciate this article post.

alternatif JawaPoker

alternatif JawaPoker

Appreciate this post. Let me try it out.

custothi manufa

custothi manufa

I read this piece of writing fully concerning the comparison of most recent and earlier technologies, it’s awesome article.

Chong Chay

Chong Chay

When someone writes an post he/she keeps the idea of a user in his/her brain that how a user can know it. Therefore that’s why this article is amazing. Thanks!