Every file and directory in the Linux system is owned by a specific user and group and has permissions that allow performing particular actions on this file or folder. When one of these settings is not set up properly, the mentioned error message appears.
Feel free to check this article for a better understanding of the issue with permissions.
There are several reasons why you may receive the permission error.
The first one – either the owner/group or permissions are not set up properly. This is the first item that should be checked.
The second one – the .htaccess file executes the code that contains incorrect redirect settings. Probably, the redirect is set up for the file/folder with a wrong owner/group or permissions. Also, there may be the following line in the .htaccess file that causes such an error:
To resolve this issue, the line should be removed.
This is the second item that should be checked and fixed if it is found.
This issue also may occur if you delete the public_html folder accidentally and create it manually again without contacting our Hosting Department. In this case, permissions for public_html and other system folders get set up incorrectly, and you receive the mentioned error.
These designations - ‘/’ and ‘/ index.html’ - in the error message associate with the direct folder or file that Apache tries to execute. This symbol ‘/’ means the public_html directory; this one ‘/ index.html’ – the file that is located in the public_html directory (the index.html file in particular). If Apache tries to refer to the file or folder whose owner or permissions are not set up properly, you will receive the same error but with the direct path which is in question.
Error message: You do not have permission to access /index.html
Solution: You should check the permissions of the index.html file. You may check and set them using either the command window (via Shell access) or File Manager that is located in the cPanel account. The permissions of files should be 644.
Using Shell access:
1. Connect to your account via SSH protocol
2. Follow the public_html folder using the cd public_html command
You may check which folder you are in now using the ‘pwd’ command. The result of this command should be ‘home/cPanel_username/public_html’.
3.Use the ls -l /home/$USER$/index.html command, where $USER$ is your cPanel username.