Re: Permissions not working

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Pallav Kalva <pkalva(at)deg(dot)cc>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Permissions not working
Date: 2004-04-29 21:59:11
Message-ID: Pine.LNX.4.33.0404291558160.11110-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 29 Apr 2004, Pallav Kalva wrote:

> scott.marlowe wrote:
>
> >On Thu, 29 Apr 2004, Pallav Kalva wrote:
> >
> >
> >
> >>Hi ,
> >>
> >> I am having some problems with setting up permissions in Postgres. I
> >>have a database for ex: 'ups' and it was owned previously by
> >>'postgres(superuser)' but now i have changed the ownership to new user
> >>'ups' all the tables are owned by these user 'ups'. This database doesnt
> >>have any schemas except for 'Public'. I have created another user lets
> >>say 'test' and i didnt give 'test' user any permissions to access the
> >>tables owned by 'ups' but still when i login to 'ups' database as psql
> >>ups test and run a select on the tables owned by 'ups' database it
> >>goes through.
> >> I dont want user 'test' to access any tables from the 'ups'
> >>database, i tried revoking permissions it still doesnt work. Can anyone
> >>tell me what is wrong here ?
> >>
> >>
> >
> >Log in as the superuser (usually postgres) and see what you get from this
> >query:
> >
> >select usesuper from pg_shadow where usename='test';
> >
> >if usesuper is t, then test is a superuser and can do anything he wants.
> >You need to issue the command:
> >
> >alter user test with nocreateuser;
> >
> >If that isn't the problem, let us know.
> >
> >
> Thanks! for the quick reply, I ran the above query and it is 'f' for the
> 'test' user, 'test' is not a super user.

Ok, then what does

\z tablename

where tablename is one of the tables you don't want test to access.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Yudie 2004-04-29 22:46:21 isnumeric() function?
Previous Message Pallav Kalva 2004-04-29 21:45:12 Re: Permissions not working