pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: arasopero.1@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18054: Permission denied.
Date: Sun, 13 Aug 2023 23:27:19 -0400
Message-ID: <791480.1691983639@sss.pgh.pa.us> (raw)
In-Reply-To: <18054-792b6eaac27319ad@postgresql.org>
References: <18054-792b6eaac27319ad@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> I can not make backup and restoration of my db by this issues:
> baap@baap-notebookpc:~$ sudo su postgres
> [sudo] password for baap: 
> postgres@baap-notebookpc:/home/baap$ psql
> could not change directory to "/home/baap": Permission denied
> psql (15.4 (Ubuntu 15.4-1.pgdg22.04+1))

You have not shown an actual failure here.  The "could not change
directory" warning might be alarming, but you have not explained
how it causes you any problem.

What is actually happening, I think, is that psql is chdir'ing
to someplace else in pursuit of figuring out its own absolute
path, and then it tries to chdir back to where it was started
from, and fails because that directory is not readable by the
postgres user.  It produces a warning about that but continues
anyway.  So this doesn't affect your ability to use SQL
commands, but it might affect your ability to run meta-commands
that expect the current working directory to be "/home/baap".
However, given that psql could not read any files within that
directory, it's not clear to me what practical problem ensues
that wouldn't manifest in some other form anyway.

			regards, tom lane





view thread (3+ messages)

Message-ID: <791480.1691983639@sss.pgh.pa.us>
Permalink:  ../791480.1691983639@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/791480.1691983639@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, arasopero.1@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18054: Permission denied.
  In-Reply-To: <791480.1691983639@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox