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!
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset SSH port back to default port 22?

In some situations most of us may come across a problem that we are able to log into the WHM but...

How to setup the root login alert notification email?

Its very important to keep a check on your servers and who logs into the server, From security...

How to enable Open SSL on WHM?

Before enabling open SSL, you can check whether it is already enabled on your server. Please fire...

How to install mod_pagespeed on WHM?

'mod_pagespeed' is module of Apache which is nothing but plugin which is used for compressing the...

How to enable Hot Link Protection in cPanel?

To avoid other sites to use your website's bandwidth, you can enable the hot link protection....

Powered by WHMCompleteSolution