apache permission denied - Mailing list pgsql-general

From Chris Cosner
Subject apache permission denied
Date
Msg-id 48764FE3.1030302@stanford.edu
Whole thread Raw
Responses Re: apache permission denied
List pgsql-general
Using RHEL 5, with Postgresql 8.1, Apache, mod_perl, mod_auth_pgsql,
DBI, DBD::Pg

Perl cgi scripts that access the database get the following in httpd
error_log:
DBI connect('dbname=db','',...) failed: could not connect to server:
Permission denied

A direct test with a simple SQL command in the file, "command"
# sudo -u apache psql db < command
psql: FATAL:  role "apache" is not permitted to log in

At the psql command line, \z shows
apache=arwdRxt
for all tables

And httpd.conf definitely has
User apache
Group apache

I have restarted httpd and postmaster and the machine. These scripts
work with postgresql 7x, but the grant syntax is different in 8x, so I
wonder if the problem is how to grant apache privileges, or some extra
step I'm missing.

pgsql-general by date:

Previous
From: MargaretGillon@chromalloy.com
Date:
Subject: Moving legacy application to JAVA, programming learning curve
Next
From: Ismael Almaraz Ezparza
Date:
Subject: Re: storing latitude and longitude