Re: Upgraded, now permission denied.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jason Whitener <jwhitene(at)pcc(dot)edu>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Upgraded, now permission denied.
Date: 2014-06-13 00:48:50
Message-ID: 29499.1402620530@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Jason Whitener <jwhitene(at)pcc(dot)edu> writes:
>> Well, that's what I'd expect to see --- but the prompt indicates that you
>> did this in the "postgres" database, which is not where you're having the
>> problem. We need to look at the public schema within the mypcc database.

> Oops. Here's the mypcc database.

> psql mypcc mypcc
> mypcc=> select * from pg_namespace where nspname = 'public';
> nspname | nspowner | nspacl
> ---------+----------+------------------------
> public | 10 | {postgres=UC/postgres}
> (1 row)

Ah-hah, as I rather suspected: public access to the "public" schema has
been revoked. (There's some info in the GRANT man page about reading
ACL displays, if you're not sure how to interpret the above.)

> mypcc=> \dt
> No relations found.

The reason for these odd behaviors is that unreadable schemas get dropped
out of your search_path (rather than throwing errors). So the tables are
there, but unless you're superuser you can't get at them.

I'd suggest a "GRANT ALL ON SCHEMA PUBLIC TO PUBLIC".

It's still unclear how you got those permissions revoked, but it seems
pretty clear that you didn't really want to do that.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Rajmohan C 2014-06-13 05:46:48 unable to attach client process to postgres server using gdb
Previous Message Shreesha 2014-06-12 23:30:48 How to modify the postgresql source code and build it?