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

Cpanel Email Account create Error: No specific error was returned with the failed API Call

Email account creation from Cpanel results in this error. Generally, this error is encountered...

How to Transfer Files Between Remote Systems?

This article will assist you to transfer web content between two remote Linux machines. cPanel...

What is the path of home directory in Windows and Linux Shared Hosting plans?

For Linux users, the path of home directory is /home/username/public_html.For Windows users, the...

How to Display Actual Error in Magento Website?

You may have seen following errors when Magento do not work properly for some reason. These...

Is HTML5 Supported in Your Servers?

Since HTML content has nothing to do with the web server, there are no special requirements...