Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7KH5-0001tZ-KH for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2019 14:04:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7KH4-0001Eo-G1 for pgsql-general@arkaria.postgresql.org; Mon, 09 Sep 2019 14:04:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7KH4-00014E-2I for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2019 14:04:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7KH0-0007SA-NA for pgsql-general@lists.postgresql.org; Mon, 09 Sep 2019 14:04:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x89E3vU8028298; Mon, 9 Sep 2019 10:03:58 -0400 From: Tom Lane To: "Peter J. Holzer" cc: pgsql-general@lists.postgresql.org Subject: Re: Permissions on postgresql.conf, psql and patroni In-reply-to: <20190909105814.GB11736@hjp.at> References: <20190909105814.GB11736@hjp.at> Comments: In-reply-to "Peter J. Holzer" message dated "Mon, 09 Sep 2019 12:58:14 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28296.1568037837.1@sss.pgh.pa.us> Date: Mon, 09 Sep 2019 10:03:57 -0400 Message-ID: <28297.1568037837@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Peter J. Holzer" 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