> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# About the '403 Forbidden' error message

> Discover the causes and solutions for the "403 Forbidden" error, complete with code snippets, in this concise guide.

This article describes why a "403 Forbidden" error message may occur, and how to resolve it.

## Problem

When you try to access your site in a web browser, you receive a "403 Forbidden" error message.

Additionally, you may see entries in the error log similar to the following line:

```
[Wed May 22 08:29:35 2013] [crit] [client xxx.xxx.xxx.xxx] (13)Permission denied: /home/username/public_html/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
```

## Cause

This problem occurs when any of the following conditions is true:

* There is no index file in the document root directory (for example, there is no *index.html* or *index.php* file in the *public\_html* directory).

* Permissions are set incorrectly for either the *.htaccess* file or the *public\_html* directory:

  * The file permissions for the *.htaccess* file should be set to **644** (read and write permissions for the user, and read permissions for the group and world).

  * The permissions for the *public\_html* directory should be set to **755** (read, write, and execute permissions for the user, and read and execute permissions for the group and world). When the "403 Forbidden" error occurs, this often indicates that the permissions for the *public\_html* directory are set incorrectly to **644**.

## Resolution

First, make sure there is an index page in the document root directory.

Next, make sure the correct file permissions are set for the *.htaccess* file. To do this, type the following command at the command prompt:

```bash theme={null}
chmod 644 ~/public_html/.htaccess
```

Lastly, make sure the correct file permissions are set for the *public\_html* directory. To do this, type the following command at the command prompt:

```bash theme={null}
chmod 755 ~/public_html
```

<Tip>
  Alternatively, you can change file permissions by using the cPanel File Manager. For more information about how to use cPanel to change file permissions, please see [this article](/docs/file-permissions).
</Tip>

## More information

For more information about file permissions, please visit [http://en.wikipedia.org/wiki/Filesystem\_permissions#Traditional\_Unix\_permissions](https://en.wikipedia.org/wiki/Filesystem_permissions#Traditional_Unix_permissions).

## Related articles

* [Using .htaccess files](/docs/using-htaccess-files)

* [Default directory index page](/docs/default-directory-index-page)

* [Directory index listings](/docs/directory-index-listings)
