How to fix Error You do not have permission to access…
- Category : cPanel Question
- Posted on : Jan 23, 2020
- Views : 867
- By : HostSEO
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:
Options -Indexes
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.
The usage of this command will show you the permissions of the index.html file. The ideal result of this command should be:
-rw-r--r-- number cPanel_username cPanel_username day month year time index.html
4. If you see any differences in the permissions field (-rw-r--r-- ) , you need to perform the following command chmod 644 index.html
This command sets up the correct permissions for the index.html file.
Using File Manager
1. Log into cPanel
2. Follow the File Manager icon in the Files field
3. At the top of the window that opens, you will see the Change Permissions icon
4. Choose the index.html file > click Change Permissions
5. Set up permissions to 644 > Save.
Error message: You do not have permission to access /
Solution: You should check the permissions of the public_html folder. You may check them using either the command window (via Shell access) or File Manager that is located in the cPanel account. The permissions of the public_html folder should be 750.
Using Shell access
1. Connect to your account via SSH protocol
2. Use the cd ~ && ls -l | grep public_html command
The usage of this command will show you the permissions of the public_html folder. The ideal result of this command should be:
drwxr-x--- number cPanel_username nobody day month year time public_html/
3. If you see any differences in the permissions field (drwxr-x--- ), you need to set the correct ones. To do this, use the following command chmod 750 public_html.
4. If you see any differences in the group field (nobody), you need to contact our Support team in order for them to set up the correct group. Unfortunately, you are not able to set the correct group yourself because you do not have the root access to the server.
Using File Manager
1. Log into cPanel
2.Follow the File Manager icon in the Files field
3.On the left of the window that opens, you will see permissions of all files and folders
4.If the permissions of the public_html folder are not 750, you need to set the correct ones. To do this, perform the following actions:
- Choose the public_html folder > click on the Change Permissions icon
- Set up permissions to 750 > Save.
5. Clear the browser cache
6. Clear your local DNS cache
7. If you are still experiencing the same issue, contact our support to set the correct group to the public_html folder.
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu