Fixing “Can Not Open Directory For URI:/!” Bug
Cpanel is a popular web hosting platform that has been around since 1997. But it does come with a few teething problems. One of the more common issues faced by users is that they get the error:
[ERROR] Can not open directory for URI: /!
Can Not Open Directory For URI
A common gripe with Cpanel users is the above error. You are able to edit your webpages, and you are able to pull up the sub page. You can make changes, see the changes, and you can save their work. But when you log out and type in the address in the address bar, you may find that [ERROR] Can not open directory for URI: /! appears.
“Such error mostly occurs because of the mistakes in code.
If the PHP function types are set incorrectly,
the route to files is wrong as well, and the error message shows up.”
– Ivan, Mobilunity WordPress Developer.
How To Fix Can Not Open Directory For URI
Fixing the error is fortunately really simple. If your domain is not loading, you can fix it in just a few simple steps:
- Login to your Cpanel account
- Check the permissions on the directory where the error is happening
- Change the permission of the director to 755 permissions
- Problem solved!
Apart From 755 Permissions, What Cpanel Permissions Exist?
All files on Linux computers will have access permissions. The operating system then knows how to deal with requests to allow to access the files. As with all computers, there are three access types:
There are also three cpanel user group types:
For your website to run properly, there are three types of Cpanel permissions that need to be set:
- HTML files and images rely on the value 644, which is set automatically
- All your folders have to be executable by others, and rely on the value 755. This is also set automatically.
- CGI files should be executable by others, and rely on the value 755. This is set manually when you upload files.
“Cannot access my WordPress site! Help me!” These are the most common words users constantly say. If you are one of them, go on reading to fix the problem.
Disclaimer: All product names and trademarks are the property of their respective owners, which are in no way associated or affiliated with Mobilunity. Use of them does not imply any affiliation with or endorsement by them.