Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com
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.

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution