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

After the last hestia update, I can no longer access PHPMyAdmin

I installed Hestiacp in its latest version and at first glance everything works fine but when I try to work with Phpmyadmin a screen appears with an error Existing configuration file (/etc/phpmyadmin/config.inc.php) is not readable.

Help Please!!

3 Likes

Hello @digital21,

Could you please show the output of these commands?

ls -la /etc/phpmyadmin/
grep hestiamail /etc/{passwd,group}
grep -r hestiamail /etc/php/
ls -ld /usr/share/phpmyadmin/tmp/
ls -ld /var/lib/roundcube/
root@panel:~# ls -la /etc/phpmyadmin/
total 28
drwxr-xr-x   3 root hestiamail  4096 Nov 28 20:59 .
drwxr-xr-x 122 root root       12288 Nov 28 20:57 ..
drwxr-x---   2 root hestiamail  4096 Nov 28 18:50 conf.d
-rw-r-----   1 root hestiamail  1033 Nov 28 20:59 config.inc.php
-rw-r-----   1 root www-data     297 Nov 28 20:59 hestia-sso.inc.php
root@panel:~# grep hestiamail /etc/{passwd,group}
/etc/passwd:hestiamail:x:1000:1000:[email protected]:/home/hestiamail:/bin/sh
/etc/group:hestiamail:x:1000:
root@panel:~# grep -r hestiamail /etc/php/
/etc/php/5.6/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/5.6/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/5.6/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/7.4/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/7.4/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/7.4/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/7.3/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/7.3/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/7.3/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/7.1/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/7.1/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/7.1/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/7.2/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/7.2/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/7.2/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/8.1/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/8.1/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/8.1/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/8.2/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/8.2/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/8.2/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/8.2/fpm/pool.d/www.conf:;"hestiamail" user created to prevent users fro                                                                                        m abusing this config
/etc/php/8.2/fpm/pool.d/www.conf:user = hestiamail
/etc/php/8.0/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/8.0/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/8.0/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/7.0/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/7.0/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/7.0/fpm/pool.d/dummy.conf:user = hestiamail
/etc/php/8.3/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/8.3/fpm/pool.d/dummy.conf:;"hestiamail" user created to prevent users f                                                                                        rom abusing this config
/etc/php/8.3/fpm/pool.d/dummy.conf:user = hestiamail
root@panel:~# ls -ld /usr/share/phpmyadmin/tmp/
drwxrwx--- 2 root hestiamail 4096 Nov 28 18:50 /usr/share/phpmyadmin/tmp/
root@panel:~# ls -ld /var/lib/roundcube/

To fix it:

chown -R root:www-data /etc/phpmyadmin/
13 Likes

PHP runs under hestiamail
/etc/php/8.2/fpm/pool.d/www.conf:user = hestiamail

So it should be readable by this user …

Unfortunately tt’s not because the group is being forced to be www-data.

user = hestiamail
group = www-data

/var/lib/roundcube and /etc/roundcube/ have the same issue but there is no problem because in those dirs the files and dirs are readable by others.

This has worked for me thank you.

Hello my friend. How did you solve the problem? I have the same problem.

I ran this command, and then it worked.

2 Likes

this has worked for me too. thanks

Hestia 1.8.11
Debian 12.4

1 Like

This worked for me too… Thanks bro @sahsanu

1 Like

It worked for me. Thank you!

Hi there, Ive attempted to use this fix for my isntall however it did not work.
I ran all the commands you mentioned previouslyand got the following:

cameron@hcp:~$ ls -la /etc/phpmyadmin/
total 24
drwxr-xr-x 3 root hestiamail 4096 Dec 13 07:10 .
drwxr-xr-x 119 root root 12288 Jan 29 04:32 …
drwxr-x— 2 root hestiamail 4096 Dec 13 07:10 conf.d
-rw-r----- 1 root hestiamail 980 Dec 13 07:10 config.inc.php
cameron@hcp:~$ grep hestiamail /etc/{passwd,group}
/etc/passwd:hestiamail:x:1002:1003:[email protected]:/home/hestiamail:/bin/sh
/etc/group:hestiamail:x:1003:
cameron@hcp:~$ grep -r hestiamail /etc/php/
/etc/php/8.2/fpm/pool.d/www.conf:;“hestiamail” user created to prevent users from abusing this config
/etc/php/8.2/fpm/pool.d/www.conf:user = hestiamail
/etc/php/8.2/fpm/pool.d/dummy.conf:listen.owner = hestiamail
/etc/php/8.2/fpm/pool.d/dummy.conf:;“hestiamail” user created to prevent users from abusing this config
/etc/php/8.2/fpm/pool.d/dummy.conf:user = hestiamail
cameron@hcp:~$ ls -ld /usr/share/phpmyadmin/tmp/
drwxrwx— 2 root hestiamail 4096 Dec 13 07:10 /usr/share/phpmyadmin/tmp/
cameron@hcp:~$ ls -ld /var/lib/roundcube/
drwxr-xr-x 11 root hestiamail 4096 Dec 13 07:11 /var/lib/roundcube/

and when i ran your suggested fix it returned this:
cameron@hcp:~$ chown -R root:www-data /etc/phpmyadmin/
chown: changing ownership of ‘/etc/phpmyadmin/config.inc.php’: Operation not permitted
chown: cannot read directory ‘/etc/phpmyadmin/conf.d’: Permission denied
chown: changing ownership of ‘/etc/phpmyadmin/’: Operation not permitted

You must execute the commands as user root:

chown -R root:www-data /etc/phpmyadmin/
chown -R hestiamail:www-data /usr/share/phpmyadmin/tmp/

Or use sudo:

sudo chown -R root:www-data /etc/phpmyadmin/
sudo chown -R hestiamail:www-data /usr/share/phpmyadmin/tmp/
1 Like

ok i have run these commands and can access phpmyadmin, however the website wont load and chrome just says :slight_smile:

For Debian 12
chmod +0644 /etc/phpmyadmin/config.inc.php

1 Like

After this i can’t access my hostname domain.com:8083 can you tell me how to fix that?

phpmyadmin is not realy related to hestia interface, check your logs and provide more informations what “can’t access” means.

1 Like

Just experienced this on a fresh install of hestia.
chown -R root:www-data /etc/phpmyadmin/
to fix

1 Like

you are a life saver man ! Thank you

1 Like