From: David Stanaway <david@stanaway.net>
To: Denny-Schierz <cuall@gmx.de>
Cc: pgsql-admin@postgresql.org
Subject: Re: Linux user www-data has no access to amphora2 DB
Date: 22 Apr 2002 12:51:18 -0500
Message-ID: <1019497878.24392.69.camel@ciderbox> (raw)
In-Reply-To: <19237774917.20020422193259@gmx.de>
References: <19237774917.20020422193259@gmx.de>
On Mon, 2002-04-22 at 12:32, Denny-Schierz wrote:
> Hi pgsql-admin,
>
> i want to install the amphora2 light groupware software under Debian Woody
> with pgsql 7.2.1. I have to restore a dump into the amphora2 DB that
> i created before.:
> -----------------
> testlinux:/home/amphora2/inst# su www-data -s /bin/bash -c 'psql amphora2 < amphora2.0.dump'
> -----------------
>
> but postgres tells me:
Does www-data exist as a postgres user?
I have tried to reproduce your problem, but I can't.
I don't have a password for www-data so I use sudo:
dstanawa@ciderbox:~$ sudo -u www-data psql -c "select version()"
template1
version
-----------------------------------------------------------------------
PostgreSQL 7.2.1 on powerpc-unknown-linux-gnu, compiled by GCC 2.95.4
(1 row)
dstanawa@ciderbox:~$ tail -11 /etc/postgresql/pg_hba.conf
local all ident
sameuser
#host all 127.0.0.1 255.0.0.0 trust
host all 0.0.0.0 0.0.0.0 reject
# If you want to allow non-local connections, you will need to change
'reject'
# to 'crypt' or some other suitable authentication method. (Debian
postgresql
# is not built with Kerberos authentication enabled.)
# To allow TCP/IP access, even from localhost, the postmaster must also
be
# started with the -i option or the option TCPIP_SOCKET must be set in
# /etc/postgresql/postgresql.conf.
dstanawa@ciderbox:~$ cat /etc/debian_version
3.0
> -----------------
> psql: FATAL 1: IDENT authentication failed for user "www-data"
> -----------------
>
> my pg_hba.conf:
>
> local amphora2 ident amphora
> local all ident sameuser
> host all 127.0.0.1 255.0.0.0 ident sameuser
> host all 0.0.0.0 0.0.0.0 reject
Anyway.. you probably want to restore the database as a super user (EG:
User Postgres) The dump script should have
\connect - "www-data"
statements in it. It also may have some
\connect - "postgresql"
statements too. which could cause problems as user www-data
--
David Stanaway
Attachments:
signature.asc (application/pgp-signature, 523B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: david@stanaway.net, cuall@gmx.de
Subject: Re: Linux user www-data has no access to amphora2 DB
In-Reply-To: <1019497878.24392.69.camel@ciderbox>
References: <19237774917.20020422193259@gmx.de> <1019497878.24392.69.camel@ciderbox>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox