Posts tagged Existing configuration file (./config.inc.php) is not readable

PHPMyAdmin : Existing configuration file (./config.inc.php) is not readable

When trying to access PhpMyadmin from CPanel/WHM if you are getting the error :

Existing configuration file (./config.inc.php) is not readable

this means that the ownership of the file “config.inc.php” was not correct .

And you can easily fix this by following the below steps :

Login to the server as root user :

root@server[#] cd /usr/local/cpanel/base/3rdparty/phpMyAdmin

and then check the ownership of the file : config.inc.php

root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# ls -l config.inc.php

-rw-r—– 1 root root 2409 Nov 12 11:57 config.inc.php

and the ownership should be :

-rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php

which you can easily set by running the below command :

root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root:cpanelphpmyadmin config.inc.php

Or

root@server[/usr/local/cpanel/base/3rdparty/phpMyAdmin]# chown root.cpanelphpmyadmin config.inc.php

Now when you run the command ls -l config.inc.php it should show the output as :

-rw-r—– 1 root cpanelphpmyadmin 2409 Nov 12 11:57 config.inc.php

and finally restart CPanel service on the server

root@server[#] /etc/init.d/cpanel restart

That’s all easy isn’t it.