How Do I Fix 403 Forbidden Error?

The 403 Forbidden Error indicates that your website files have incorrect permissions. Every file/directory of your website have an individual settings that controls who is allowed to read, write,and execute specified file/directory. When you create new file or folder, default permissions are automatically applied which can be changed later on.

The website root directory public_html must have 750, other directories and executable scripts within the cgi-bin folder must have 755 permissions. Files (.php, .html etc), images and text files should be 644.


What is File Permissions?


There are three types of permissions.
  1. Read
  2. Write
  3. Execute
File permissions can be determined and set through FTP client or from cPanel. At cPanel, you would see file permissions in the form of numbers as follows.

7 ==> Read + Write + Execute
6 ==> Read + Write
5 ==> Read + Execute
4 ==> Read Only
3 ==> Write + Execute
2 ==> Write Only
1 ==> Execute Only
0 ==> Access Denied


Ideal Permissions


Public_html folder ==> 750
Subfolders ==> 755
Any files (.html, .php, media files, images etc) ==> 644
CGI and Perl scripts ==> 755

Permissions Explanation


777 (Not Recommended)

  • Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
  • Group :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
  • World :: READ(4) + WRITE(2) + EXECUTE(1) ==>7


755 (Subfolders)

  • Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
  • Group :: READ(4) + EXECUTE(1) ==>5
  • World :: READ(4) + EXECUTE(1) ==>5


750 (Public_html)

  • Owner :: READ(4) + WRITE(2) + EXECUTE(1) ==>7
  • Group :: READ(4) + EXECUTE(1) ==>5
  • World :: 0


644 (All files)

  • Owner :: READ(4) + WRITE(2)==>6
  • Group :: READ(4)==>4
  • World :: READ(4)==>4


444 (Read Only)

  • Owner :: READ(4)==>4
  • Group :: READ(4)==>4
  • World :: READ(4)==>4


How Do I Set Permissions?


  1. Login to cPanel and locate File Manager.

    File Manager

  2. At File Manager, navigate to file/directory whose permissions you want to change.

    Select File

  3. Right click on the file/folder and select Change Permissions.
  4. Here you can change the permissions for the file/folder.

    Change Permissions

  5. Once you have set new permissions, click on Change Permissions button.


Default Document is not set


If all permissions are set and even though your website shows 403 forbidden, most likely default page is not set for your website. With Windows Hosting, you can configure the default document for the website or a virtual directory from WebsitePanel. With Linux Hosting, you can set default document for your website via .htaccess file. You can specify more than one default document for a website.

When you browse any website, web server (Apache or IIS) searches for the default documents in the order in which they are listed. If the first default document is not available, web server displays the next default page from the list.

If web server could not find any match and directory listing is enabled, web server displays list of folders. If directory listing is disabled, web server will return an HTTP Error 403 - Forbidden message to the browser.

  • 0 Users Found This Useful

Was this answer helpful?


Related Articles

Can I access Remote MySQL database from your Web Hosting?

Yes, you can surely access the remote MySQL database, if remote MySQL server (where your database...

How to install MediaWiki in Linux hosting?

Pre-installation Steps: Set up MySQL database Please refer following article to set up MySQL...

What is parked domain?

Pointing one domain to another domain is called Domain Parking. Both Parked domain and Main...

How to Manage Shared cPanel Account from Client Area?

This article will assist you to manage your Shared linux cPanel account from client area. At...

Parse ASP pages as normal Text/HTML in cPanel server using MIME type

Problem statement One of our customers had some old .ASP file names on his website. The web...