Skip site navigation (1) Skip section navigation (2)

Re: permission prob: granted, but still denied

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <s-psql(at)rhythm(dot)cx>
Cc: Richard Huxton <richardh(at)archonet(dot)com>,<pgsql-general(at)postgresql(dot)org>
Subject: Re: permission prob: granted, but still denied
Date: 2002-10-30 18:19:02
Message-ID: 20021030101435.P32794-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, 30 Oct 2002 s-psql(at)rhythm(dot)cx wrote:

> On Wed, Oct 30, 2002 at 10:02:38AM +0000, Richard Huxton wrote:
> > On Wednesday 30 Oct 2002 6:53 am, s-psql(at)rhythm(dot)cx wrote:
> > > Hello, I'm having some sort of permission problem on my database, running
> > > version 7.2.3.
> > >
> > > The user in question is 'webauth', who does not own any of the objects in
> > > question, nor is a superuser. He has been GRANTed ALL to a table 'websess'
> > > as well as a table websess references, 'cscuser'. However, when that user
> > > attempts to INSERT a valid row into table websess,
> > >
> > > 	ERROR: cscuser: Permission denied.
> > >
> > > is returned. Does anyone know why that occurs? The owner of the database &
> > > tables is able to insert rows just fine.
> >
> > Do you have any serial types or sequences on the table? If so, you'll need to
> > check permissions on those too.
> >
>
> Yep, all relevant sequences have permissions too:
>
> csclub=> \z
>            Access privileges for database "csclub"
>           Table          |         Access privileges
> -------------------------+------------------------------------
> ...
>  cscuser                 | {=,webauth=arwdRxt}
>  cscuser_userid_seq      | {=,csclub=arwdRxt,webauth=arwdRxt}
>  websess                 | {=,webauth=arwdRxt}
> csclub=> INSERT INTO websess(hash,userid,created)
>          VALUES('abde',1,'2002-09-20');
> ERROR:  cscuser: Permission denied.
>
> Anyone have any other ideas?

I'd guess it was the foreign key constraint check that was doing it,
but that should be does as the owner of the other table. Try turning
on query logging and seeing if you can get a better idea of what's
happening.



In response to

Responses

pgsql-general by date

Next:From: Tom LaneDate: 2002-10-30 18:19:27
Subject: Re: move 0 behaviour
Previous:From: AragornDate: 2002-10-30 18:15:28
Subject: Sequence - Use calculated start value?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group