1

Topic: phppgadmin shows no databases

==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: Centos 6.5, Linux 3.14.1-x86_64-linode39 on x86_64
- Related log if you're reporting an issue: n/a
====

When I log into phpPgadmin with any DB account, the webUI interface states no databases found. How can I use this tool to view DB's and their content?

Thanks.

- Fabian S.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: phppgadmin shows no databases

Which DB account did you use? Does it own any database?

3

Re: phppgadmin shows no databases

ZhangHuangbin wrote:

Which DB account did you use? Does it own any database?

I've tried using any and all user accounts listed throughout the installation details email present after you compete the install in the postmaster account. They all behave the same in phppgadmin.

I'm new to PostgreSQL but I had assumed that if iredmail lists those accounts for different services, that they would be the db owners.

Thanks.

4

Re: phppgadmin shows no databases

Could you please capture a screenshot of the phpPgAdmin page which you claim no database listed?

5

Re: phppgadmin shows no databases

ZhangHuangbin wrote:

Could you please capture a screenshot of the phpPgAdmin page which you claim no database listed?

image attached. this is using the vmailadmin user.

Post's attachments

phppgadmin_screen.jpg 149 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

6

Re: phppgadmin shows no databases

Can you login to PostgreSQL server on command as 'vmailadmin' user? Does it own any database?

7

Re: phppgadmin shows no databases

when i do that i receive:

[root@mail ~]# psql -U vmailadmin
Password for user vmailadmin:
psql: FATAL:  database "vmailadmin" does not exist
[root@mail ~]#


when i try the postgres user:

[root@mail ~]# psql -l -U postgres -W
Password for user postgres:
                                    List of databases
     Name      |  Owner   | Encoding |  Collation  |    Ctype    |   Access priv
ileges
---------------+----------+----------+-------------+-------------+--------------
---------
amavisd       | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
cluebringer   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
iredadmin     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
postgres      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
roundcubemail | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
template0     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                 : postgres=CTc/
postgres
template1     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                 : postgres=CTc/
postgres
vmail         | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
(8 rows)

[root@mail ~]#


so they're all owned by postgres but postgres can't login to the phppgadmin UI. so i guess there's no using it or do you have another suggestion? Thanks.

- Fabian S.

8

Re: phppgadmin shows no databases

What's the output of below SQL command when you logged in as 'postgres' user?

sql> \c vmail;
sql> \z

Does it show addition owners? Sample putput:

                                          Access privileges
 Schema |           Name           |   Type   |     Access privileges     |
--------+--------------------------+----------+---------------------------+
 public | admin                    | table    | postgres=arwdDxt/postgres+|
        |                          |          | vmail=r/postgres         +|
        |                          |          | vmailadmin=arwd/postgres  |
...

9

Re: phppgadmin shows no databases

Access privileges
Schema |           Name           |   Type   |     Access privileges     | Column access privileges
--------+--------------------------+----------+---------------------------+--------------------------
public | admin                    | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | alias                    | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | alias_domain             | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | anyone_shares            | table    | postgres=arwdDxt/postgres |
                                              : vmailadmin=arwd/postgres
public | deleted_mailboxes        | table    | postgres=arwdDxt/postgres |
                                              : vmailadmin=arwd/postgres
public | deleted_mailboxes_id_seq | sequence | postgres=rwU/postgres     |
                                              : vmailadmin=rw/postgres
public | domain                   | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | domain_admins            | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | mailbox                  | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
                                              : roundcube=rw/postgres
public | recipient_bcc_domain     | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | recipient_bcc_user       | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | sender_bcc_domain        | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | sender_bcc_user          | table    | postgres=arwdDxt/postgres |
                                              : vmail=r/postgres
                                              : vmailadmin=arwd/postgres
public | share_folder             | table    | postgres=arwdDxt/postgres |
                                              : vmailadmin=arwd/postgres
public | used_quota               | table    | postgres=arwdDxt/postgres |
                                              : vmail=arwd/postgres
                                              : vmailadmin=arwd/postgres
(15 rows)

vmail=#

10

Re: phppgadmin shows no databases

Well, it looks just fine.

fsantiago06111979 wrote:

[root@mail ~]# psql -U vmailadmin
Password for user vmailadmin:
psql: FATAL:  database "vmailadmin" does not exist

This command should work, you must specify a database name. For example:

# psql -U vmailadmin -d vmail

11

Re: phppgadmin shows no databases

It does work fine. I was wondering though if the same data could be viewed successfully through the phppgadmin UI?

12

Re: phppgadmin shows no databases

Oops, looks like iRedMail mis-configures phpPgAdmin. Please find its config file /usr/share/phppgadmin/conf/config.inc.php, find below line:

     $conf['owned_only'] = true;

Change its value to false, then try again.

Fix will be available in upcoming iRedMail release, 0.8.7.

13

Re: phppgadmin shows no databases

that did it. thanks.