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

Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site [HTTP 403].

I was getting the following error when connecting to the Wordpress native plugin Jetpack to...

Auto Index is disabled for the directory, access denied : 403 forbidden

While accessing the directories of website (http://webiste_name/directory_name) getting 403...

pcre.backtrack_limit reached - Joomla issue

I was getting the below error on my Joomla website - pcre.backtrack_limit reached. Solution :You...

How to disable the php mail() function on cPanel with CloudLinux?

If your server installed cPanel with CloudLinux along alt-php and you want to disable php mail()...

500 No response from subprocess (/usr/local/cpanel/whostmgr/docroot/cgi/ addon_cwaf.cgi): The subprocess reported error number 2 when it ended.

The 500 internal server on WHM Comodo plugin with below Error Message: [2017-03-04 10:55:43...

Powered by WHMCompleteSolution