|
From: Gerard K. <ge...@sh...> - 2005-07-03 22:01:29
|
On Sun, 03 Jul 2005 18:22:57 +0200, Ross Gohlke <ro...@gr...> wrote: > When I visit h ttps://mydomain.com/sql-ledger/admin.pl > > I first get a login screen with a password field. I enter the password = I > set in postgres for user 'sql-ledger' and get the Accounting > Administration screen. I click Pg Database Administration. I leave the > defaults alone and click Create Dataset and get: > > Error! > > Permission denied > > I am a bit unclear on the difference between "local" and "remote" =20 > access. > Postgres is on the same box as Apache, so when I connect in a browser,= =20 > is > it local or remote? > > From data/pg_hba.conf: > local template1 sql-ledger trust > host template1 sql-ledger 127.0.0.1/32 trus= tt > > There is nothing in httpd-error.log. > > templates > users > users/members > are all owned, readable and writable by apache user. > > From users/members: > [root login] > password=3D > > Do I need to be setting host/port in Pg Database Administration? If so, > what should it be? > > Thanks in advance for any help. > > ross gohlke I haven't worked with postgres in a while, so I might be wrong... Local=3DLocal to the Machine. The connection to your database is between = =20 apache and postgres, therefore it's a local connection Remote=3DWhen you try to connect remotely to the machine - You'll only ne= ed =20 this if your database is running on a different machine than apache. I= f =20 you connect to a website, apache connects to the database, and that's seen as a local connection. local allows processes on you machine to connect to the postgres database= =20 via unix socket host allows connection via tcp/ip sockets Now your rules allow the sql-ledger user to only connect to template1 =20 database, but sql-leder needs to create new databases for each company (Datasets). Try changing it to read and restart postgres local all sql-ledger trust host all sql-ledger 127.0.0.1/32 trust This is still only local access to your database, and only the sql-ledger= =20 user is allowed. if it doesnt work, you can change it to local all all trust host all all 127.0.0.1/32 trust Which means any user can access any of the databases on the machine =20 locally. Hope it helps Regards Gerard Korsten |