Re: Nu-B here - Mailing list pgsql-general

From Maciek Sakrejda
Subject Re: Nu-B here
Date
Msg-id CAOtHd0BrGcr467VZ3GfLU23u23kU7Ke3NUXF+3Q0VLOF7eHNeg@mail.gmail.com
Whole thread Raw
In response to Nu-B here  (Amn Ojee Uw <amnojeeuw@gmail.com>)
List pgsql-general
On Wed, Jul 19, 2023, 17:36 Amn Ojee Uw <amnojeeuw@gmail.com> wrote:

After this command 'sudo -u postgres psql'
I get this message :
could not change directory to "/home/my_account": Permission denied
psql (12.15 (Debian 12.15-1.pgdg120+1))
Type "help" for help.

I tried using help, but to no avail.
What am I doing wrong?

It looks like you're hitting a non-fatal error at some point during psql startup when you're running as the "postgres" user. It seems to be a permissions issue. Do you still get the error if you run

sudo -u postgres psql --no-psqlrc

?

You may also want to create a Postgres user (possibly a superuser) matching your operating system user if you have not already done so to avoid having to deal with sudo for connecting.

Thanks
Maciek


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Nu-B here
Next
From: Tom Lane
Date:
Subject: Re: My 1st JDBC and PostgreSQL