Check out the GRANT syntax, I bet you haven't granted SELECT
permissionso to the user/table combo. -sc
On Wed, Jun 20, 2001 at 01:23:26PM +0200, tillea@rki.de wrote:
> Delivered-To: chittenden.org-sean-pgsql-general@chittenden.org
> From: tillea@rki.de
> Date: Wed, 20 Jun 2001 13:23:26 +0200 (CEST)
> X-X-Sender: <tillea@wr-linux02.rki.ivbb.bund.de>
> To: PostgreSQL General <pgsql-general@postgresql.org>
> Subject: [GENERAL] Postgres permissions for www-data
> Precedence: bulk
>
> Hello,
>
> I'm using Zope 2.3.2, PostgreSQL 7.1.2 and psycopg 0.99.2.
> On a Debian system Zope is running as user www-data.
>
> I created this user using
> > createuser www-data
>
> Moreover I made sure in psql:
>
> web=# select usename from pg_user;
> usename
> ----------
> postgres
> tillea
> www-data
> (3 rows)
> web=# grant all on testtable to "web-data" ;
> CHANGE
>
> which seems to be OK so far.
>
> Opening a database connection from Zope works well. I used the
> connection string:
>
> dbname=web
>
> Unfortunately if I want to test the connection using
>
> select * from testtable ;
>
> I get
>
> Error Type: ProgrammingError
> Error Value: ERROR: testtable: Permission denied. select * from testtable ;
>
>
> Looking at /var/log/postgres.log I see the following entries:
>
> 2001-06-19 14:05:24 [22300] DEBUG: connection: host=[local] user=www-data database=web
> 2001-06-19 14:05:43 [22300] ERROR: testtable: Permission denied.
>
> I also studied the archive:
>
> http://fts.postgresql.org/db/mw/msg.html?mid=53327
> http://fts.postgresql.org/db/mw/msg.html?mid=30785
>
> deal with this problem but I found no solution for this problem.
> According to this mails I tried to remap the username using pg_ident.conf
> but nothing helped (remapping doesn't seem to work because the log-entry
> did not change).
>
> Moreover if I try to use a connection string with any username (different
> from www-data or also www-data) and password even the connection itself
> fails.
>
> Kind regards
>
> Andreas.
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
--
Sean Chittenden