Tutorial 403 – Forbidden Case and Server Permissions

Here we are presenting the simple explanation of 403 – Forbidden Case and Server Permissions for our students of web designing. The 403 errors usually mean that the server does not have permission to view the requested file or resource. These errors are often caused by IP Deny rules, File protections, or permission problems.

In many cases this is not an indication of an actual problem with the server itself but rather a problem with the information the server has been instructed to access as a result of the request. This error is often caused by an issue on your site which may require additional review by our support teams.

Our support staff will be happy to assist you in resolving this issue. Please contact our Live Support or reply to any Tickets you may have received from our technicians for further assistance.

What can I do?

There are a few common causes for this error code including problems with the individual script that may be executed upon request. Some of these are easier to spot and correct than others.

File and Directory Ownership

The server you are on runs applications in a very specific way in most cases. The server generally expects files and directories be owned by your specific user cPanel user. If you have made changes to the file ownership on your own through SSH please reset the Owner and Group appropriately.

File and Directory Permissions

The server you are on runs applications in a very specific way in most cases. The server generally expects files such as HTML, Images, and other media to have a permission mode of 644. The server also expects the permission mode on directories to be set to 755 in most cases.

Note: If the permissions are set to 000, please contact our support team using the ticket system. This may be related to an account level suspension as a result of abuse or a violation of our Terms of Service.

IP Deny Rules

In the .htaccess file, there may be rules that are conflicting with each other or that are not allowing an IP address access to the site.

If you would like to check a specific rule in your .htaccess file you can comment that specific line in the .htaccess by adding # to the beginning of the line. You should always make a backup of this file before you start making changes.

For example, if the .htaccess looks like the following:

Order deny, allow
allow from all
deny from
deny from

Then try something like this

Order allow,deny
allow from all
#deny from
deny from

Our server administrators will be able to advise you on how to avoid this error if it is caused by process limitations. Please contact our Live Support or open a Ticket. Be sure to include the steps needed for our support staff to see the 403 error on your site.

Symbolic representation of Filesystem Permissions

The first character indicates the file type and is not related to permissions. The remaining nine characters are in three sets, each representing a class of permissions as three characters. The first set represents the user class. The second set represents the group class. The third set represents the others class.

Each of the three characters represent the read, write, and execute permissions:

r if reading is permitted, – if it is not.
w if writing is permitted, – if it is not.
x if execution is permitted, – if it is not.

The following are some examples of symbolic notation:

-rwxr-xr-x a regular file whose user class has full permissions and whose group and others classes have only the read and execute permissions.
crw-rw-r– a character special file whose user and group classes have the read and write permissions and whose others class has only the read permission.
dr-x—— a directory whose user class has read and execute permissions and whose group and others classes have no permissions.

Numeric Representation

Another method for representing permissions is an octal (base-8) notation as shown. This notation consists of at least three digits. Each of the three rightmost digits represents a different component of the permissions: user, group, and others.

Each of these digits is the sum of its component bits As a result, specific bits add to the sum as it is represented by a numeral:

The read bit adds 4 to its total (in binary 100),
The write bit adds 2 to its total (in binary 010), and
The execute bit adds 1 to its total (in binary 001).

These values never produce ambiguous combinations. each sum represents a specific set of permissions. More technically, this is an octal representation of a bit field – each bit references a separate permission, and grouping 3 bits at a time in octal corresponds to grouping these permissions by user, group, and others.

Permission mode 0755
4+2+1=7 – Read, Write, eXecute
4+1=5 – Read, eXecute
4+1=5 – Read, eXecute
Permission mode 0644
4+2=6 – Read, Write
4 – Read
4 – Read

With courtesy from BigRock Server Help Files and Documentation