Permissions on postgresql.conf, psql and patroni

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Permissions on postgresql.conf, psql and patroni
Дата
Msg-id 20190909105814.GB11736@hjp.at
обсуждение исходный текст
Ответы Re: Permissions on postgresql.conf, psql and patroni
Re: Permissions on postgresql.conf, psql and patroni
Список pgsql-general
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/>

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: pgbouncer with ldap
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: Permissions on postgresql.conf, psql and patroni