Postgresql users problem

Misiek

Well-Known Member
Feb 23, 2004
116
0
166
cPanel Access Level
Root Administrator
I have postgre installed, and have one major problem i can add db i can add users i can assaign user to db.

For example i created user _test and dbs test and i assigned user _test to dbs test

i login to pgadmin as user _test but after login i dont see any dbs thats my problem can somebody help me ??
 

Sabaote

Well-Known Member
Dec 19, 2003
63
0
156
Ribeirao Preto, Brazil
I'm having problem with postgresql+cpanel too..

I try add a DB or an User.. But when i see in cPanel don't shows anything..
When i try use the PhpPgAdmin the login Fail.. I can't access...
So please.. if anyone can help me..

Thanks!!
 

esteban

Registered
Sep 20, 2007
3
0
51
I'm having problem with postgresql+cpanel too..

I try add a DB or an User.. But when i see in cPanel don't shows anything..
When i try use the PhpPgAdmin the login Fail.. I can't access...
So please.. if anyone can help me..

Thanks!!

Same problem !
WHM 11.2.0 cPanel 11.11.0-R16715
Postgre 7.4.19-1.el4_6.1
 

lukemcr

Member
Feb 29, 2008
6
0
51
Me too. :-(

To be specific, I get errors when I open phpPgAdmin from the user's cPanel.


Warning: session_start() [function.session-start]: open(/tmp/sess_b43f28b343e91a5d0c61a83615111dd4, O_RDWR) failed: Permission denied (13) in /usr/local/cpanel/base/3rdparty/phpPgAdmin/libraries/lib.inc.php on line 56

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/cpanel/base/3rdparty/phpPgAdmin/libraries/lib.inc.php:56) in /usr/local/cpanel/base/3rdparty/phpPgAdmin/libraries/lib.inc.php on line 56

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpPgAdmin/libraries/lib.inc.php:56) in /usr/local/cpanel/base/3rdparty/phpPgAdmin/classes/Misc.php on line 359

Any ideas?
 
Last edited:

ReiJu

Well-Known Member
Mar 14, 2008
57
1
58
Got the exactly same problem here.

The problem is that cPanel cannot assign the created user to access a database. When you list postgres dbs from CLI,
Code:
# psql -U postgres -l
you can see that the dbs only owned by the main unix user, not the user assigned to it by cPanel. So if you log in to phppgadmin using main unix user, with it's password, you can browse all of your postgres databases.

Hoping some cPanel guys can enlighten us to fix this. A single working link will do.
 

ReiJu

Well-Known Member
Mar 14, 2008
57
1
58
:cool: not even a glance from cPanel guys?
 

Kevinfrom

Well-Known Member
Jan 18, 2008
47
1
56
Only the main cPanel user has access to pgsql databases using phpPgAdmin by default.

If you wish to grant full ownership of the database to a particular user, you
will first need to alter the database owner by executing the following command from CLI:

psql -U postgres -c 'ALTER DATABASE database_name OWNER TO user_name' template1

Note: database_name and user_name should be replaced with the database and user
names respectively.

Once you have done this, you will need to grant access to each individual
table. To get a listing of all tables contained in a database, execute the
following:

psql -U postgres -c '\dt' database_name

You can then execute the following for each of the tables:

psql -U postgres -c 'GRANT ALL ON table_name TO user_name' database_name

The following portions of the vendor documentation describe the syntax for
these operations.

http://www.postgresql.org/docs/8.1/static/sql-alterdatabase.html
http://www.postgresql.org/docs/8.1/static/sql-altertable.html