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!

Was this answer helpful?

 Print this Article

Also Read

The mail server could not deliver mail to mailadress@gmail.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries.

All of sudden emails are getting bounced with below bounce back messages on the cPanel server as...

How to exclude file/folder from backup (pkgacct) on cPanel server?

Is it possible to exlude file/folder from the full cPanel backup on cPanel server? Solution :-...

ERROR :Tablespace for table exist. Please DISCARD the tablespace before IMPORT.

// While creating the table from cPanel >> PHPMyAdmin>> SQL, I was getting...

How to Specify the exact time to run a backup on cPanel server?

How to Specify the exact time (hour) to run a backup on cPanel server? Solution :- By default,...

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 >>...

Powered by WHMCompleteSolution