From: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-general@lists.postgresql.org
Subject: Permissions on postgresql.conf, psql and patroni
Date: Mon, 9 Sep 2019 12:58:14 +0200
Message-ID: <20190909105814.GB11736@hjp.at> (raw)
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
Further investigation showed that the read permissions on
/etc/.../postgresql.conf were revoked at the time of the upgrade. Either
by a post-install script or maybe by patroni itself, when it started up
again.
This leads me to two questions:
1) Is there a reason to restrict read access to postgresql.conf to the
user postgres? AFAIK this file doesn't normally contain sensitive data
(unlike pg_hba.conf and pg_ident.conf which are restricted by default).
2) Why does psql need to read postgresql.conf, and more specifically,
why does it care about the location of the data directory? It
shouldn't access files directly, just talk to the server via the
socket.
hp
--
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | hjp@hjp.at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/;
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: hjp-pgsql@hjp.at
Subject: Re: Permissions on postgresql.conf, psql and patroni
In-Reply-To: <20190909105814.GB11736@hjp.at>
References: <20190909105814.GB11736@hjp.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox