Re: How to make PostreSQL utilities honor home directories?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to make PostreSQL utilities honor home directories?
Дата
Msg-id 780195.1662070574@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to make PostreSQL utilities honor home directories?  (Jeffrey Walton <noloader@gmail.com>)
Ответы Re: How to make PostreSQL utilities honor home directories?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
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

You've left out quite a lot of information here ... like what
connection that directory has to do with anything.  Is it your
current directory when you invoke this command?

If so, a plausible explanation is that psql is trying to chase a
symlink to somewhere, which involves some chdir's so it can resolve
the symlink correctly, and afterwards it has to change back to
where it started --- which would fail if it can't look up that
directory.

Why it's trying to resolve a symlink isn't apparent though.
Is the "psql" you're invoking a symlink to somewhere?

            regards, tom lane



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: How to make PostreSQL utilities honor home directories?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to make PostreSQL utilities honor home directories?