Re: No select privileges when not connecting from login postgres

From: rob stone <floriparob(at)gmail(dot)com>
To: Joseph Brenner <doomvox(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: No select privileges when not connecting from login postgres
Date: 2016-12-03 15:23:33
Message-ID: 1480778613.4556.1.camel@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Wed, 2016-11-30 at 20:48 -0800, Joseph Brenner wrote:
> I'm trying to get a new build of 9.6.1 working on a machine
> running Debian stable (jessie) and I'm seeing some odd
> behavior where things work correctly if I run psql when
> logged in as postgres, but if I run it as user 'doom' (my
> usual login), I don't seem to have any select privileges.
> Even this fails silenlty:
>
>   select 'world' as hello;
>
> But if run logged in as postgres, all is well:
>
>   sudo su - postgres
>   /usr/local/pgsql/bin/psql --dbname=doom --username=doom
>   doom=#   select 'world' as hello;
>     select 'world' as hello;
>     hello
>    -------
>     world
>    (1 row)
>
>

I run Debian testing (stretch/sid).

For years now, the Postgres binaries are stored in:-

/usr/lib/postgresql/<major version>/bin

and are root:root owned.

E.g.:-

/usr/lib/postgresql/9.6/bin/psql appears as:-

-rwxr-xr-x 1 root root  580864 Nov  2 21:04 psql

So, it is executable by anybody, which is not an issue with me.

The reason behind this path convention is to enable you to run
different major versions of Postgres on the same computer.

I don't know how you installed Postgres and all I can suggest for
starters is to physically remove it and re-install from the Debian
packages.

HTH,
Rob

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kiriakos Georgiou 2016-12-03 18:08:23 Re: Avoid sorting when doing an array_agg
Previous Message Adrian Klaver 2016-12-03 15:10:45 Re: No select privileges when not connecting from login postgres