apache permission denied

From: Chris Cosner <ccosner(at)stanford(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: apache permission denied
Date: 2008-07-10 18:07:31
Message-ID: 48764FE3.1030302@stanford.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ismael Almaraz Ezparza 2008-07-10 18:18:10 Re: storing latitude and longitude
Previous Message Ivan Sergio Borgonovo 2008-07-10 17:51:35 {SOLVED?] Re: functional index not used, looping simpler query just faster