Re: How to make PostreSQL utilities honor home directories?

Поиск
Список
Период
Сортировка
От Jeffrey Walton
Тема Re: How to make PostreSQL utilities honor home directories?
Дата
Msg-id CAH8yC8n3fJb3gJfSQeUHNNz5mEyQe1gymv6h-0OqUVzUiW6+dg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to make PostreSQL utilities honor home directories?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
On Fri, Sep 2, 2022 at 7:34 AM Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
>
> On 2022-09-01 20:49:56 -0400, Jeffrey Walton wrote:
> > On Thu, Sep 1, 2022 at 8:23 PM Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
> > >
> > > On 2022-09-01 18:16:14 -0400, Tom Lane wrote:
> > > > Jeffrey Walton <noloader@gmail.com> writes:
> > > > > We are having a heck of a time getting PostreSQL utilities to honor
> > > > > home directories. For example, when I execute this script:
> > > >
> > > > >     sudo -H -u postgres PGPASSWORD=${password} \
> > > > >         psql -h "${hostname}" -U "${username}" -d "${database}" \
> > > > >         --command="..."
> > > >
> > > > > It produces failures:
> > > >
> > > > >     could not change directory to "/home/jwalton/godojo": Permission denied
>
> > > I get the same behaviour. So it seems that psql changes to its basedir
> > > and then can't change back again.
> >
> > I guess there is no way to avoid the problem.
>
> Changing to /tmp (or some other directory accessible by posgres) before
> running the script would avoid it.
> As would (temporarily) changing the permissions of the diretor(y/ies).
> Or not using sudo at all (see other messages).

Ok, thanks everyone.



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

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: Unable to archive logs in standby server
Следующее
От: Meera Nair
Дата:
Сообщение: RE: Unable to archive logs in standby server