Failed to open dir: Permission denied in /usr/local/lib/php/autoindex/default.php

While accessing the site I was getting error as -
'Failed to open dir: Permission denied in /usr/local/lib/php/autoindex/default.php' with below error logs -

2017-03-26 21:49:51.835 [NOTICE] [local IP address ] [STDERR]
PHP Warning: opendir(/home/cPanel_username/public_html/): failed to open dir: Permission denied in /usr/local/lib/php/autoindex/default.php on line 143

Solution -

Correct the user permission on '/' partition on server - 

The user permission was not set correctly on server. It should be 'drwx--x--x' that is 711. You can set is using below command -

  • Login to server using SSH.
  • cd / - If there is name to '/' partition on your server then enter the name.
  • For example, if the '/' partition name is 'home' then you should enter 'cd /home' and fire below command -
  • chmod 711 cPanel_username
It fixed my issue and started working!
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to renew the cPanel license on your server?

Quickest way to renew cPanel license - First, you may check if the server has valid license for...

How to prevent xmlrpc attack on the WordPress?

To prevent xmlrpc attack in WordPress website just add below code to the .htaccess file of the...

How to configure Amazon S3 backups in WHM?

There is always issues on the server like Hard Drive Failures and its very important to keep your...

Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server.

I was getting below error message in cPanel while creating addon domain from cPanel >>...

requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the website operator

I was getting below error while installing Softaculous on the cpanel server -. requires the...

Powered by WHMCompleteSolution