Re: How to make PostreSQL utilities honor home directories?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org>
Cc: Jeffrey Walton <noloader(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to make PostreSQL utilities honor home directories?
Date: 2022-09-02 02:59:24
Message-ID: CAD3a31WsjeZ1FuTFY6h2Ej8i7snwTEEfYD9dSaaFPcTN_aVy6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 1, 2022 at 4:09 PM Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org> wrote:

>
> ! It produces failures:
> !
> ! could not change directory to "/home/jwalton/godojo": Permission
> denied
>
> ... this appears to me as rather a sudo issue. Because certainly
> psql cannot execute /as user postgres/ in a directory where user
> postgres is not allowed to enter.

FWIW, I don't think this is quite true, and it's more of a warning than a
failure. For example, from my own directory I can sudo to postgres and run
a psql shell with no problem. It will complain about not being able to
change directory, but it will then proceed to load and run psql just fine...

[ktanzer(at)hosting ~]$ sudo -u postgres psql
could not change directory to "/home/ktanzer": Permission denied
psql...

Cheers,
Ken

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-09-02 04:10:44 Re: How to make PostreSQL utilities honor home directories?
Previous Message Jeffrey Walton 2022-09-02 01:31:27 Re: How to make PostreSQL utilities honor home directories?