Re: Permissions on postgresql.conf, psql and patroni - Mailing list pgsql-general

From Tom Lane
Subject Re: Permissions on postgresql.conf, psql and patroni
Date
Msg-id 28297.1568037837@sss.pgh.pa.us
Whole thread Raw
In response to Permissions on postgresql.conf, psql and patroni  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Responses Re: Permissions on postgresql.conf, psql and patroni
List pgsql-general
"Peter J. Holzer" <hjp-pgsql@hjp.at> writes:
> Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 from
> http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main).
> Today I noticed that I couldn't invoke psql as an unprivileged user
> anymore:
> % psql
> Error: Invalid data directory for cluster 11 main

FYI, there's no such error string in the core Postgres sources.
I imagine that it's coming from some wrapper script.

> 1) Is there a reason to restrict read access to postgresql.conf to the
>    user postgres?

Probably not, though it only matters if you keep that outside the
data directory.

> 2) Why does psql need to read postgresql.conf, and more specifically,
>    why does it care about the location of the data directory?

psql itself won't/doesn't.  I suspect you're dealing with a wrapper
that is trying to figure out which version of psql to invoke.

            regards, tom lane



pgsql-general by date:

Previous
From: nikhil raj
Date:
Subject: Re: database "cdf_100_1313" does not exist
Next
From: Tom Lane
Date:
Subject: Re: database "cdf_100_1313" does not exist