Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMHw2-0022mx-3B for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 00:54:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qMHvz-00E2Zv-PJ for pgsql-general@arkaria.postgresql.org; Thu, 20 Jul 2023 00:54:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMHvz-00E2Zn-FA for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 00:54:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qMHvw-000XtF-3h for pgsql-general@lists.postgresql.org; Thu, 20 Jul 2023 00:54:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 36K0sIW7465498; Wed, 19 Jul 2023 20:54:18 -0400 From: Tom Lane To: Amn Ojee Uw cc: pgsql-general@lists.postgresql.org Subject: Re: Nu-B here In-reply-to: <28bc9ae9-869d-a2ee-3ebb-b4bb7bdcbb14@gmail.com> References: <28bc9ae9-869d-a2ee-3ebb-b4bb7bdcbb14@gmail.com> Comments: In-reply-to Amn Ojee Uw message dated "Wed, 19 Jul 2023 20:36:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <465496.1689814458.1@sss.pgh.pa.us> Date: Wed, 19 Jul 2023 20:54:18 -0400 Message-ID: <465497.1689814458@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Amn Ojee Uw writes: > 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.* This is normal if you launch psql via "sudo -u postgres" in a directory that the postgres user doesn't have permissions to read/chdir to. psql will still start, but its working directory will not be what you'd expect, so commands that involve local filesystem access might misbehave. We have a fix for this error report in the upcoming v16, but psql commands that involve local filesystem access will still not act very nicely if psql can't read your directory. regards, tom lane