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 1qQmm1-000yON-Gw for pgsql-general@arkaria.postgresql.org; Tue, 01 Aug 2023 10:38:42 +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 1qQmlz-005cYv-0g for pgsql-general@arkaria.postgresql.org; Tue, 01 Aug 2023 10:38:40 +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 1qQmly-005cYn-Mo for pgsql-general@lists.postgresql.org; Tue, 01 Aug 2023 10:38:40 +0000 Received: from brisi.sourcepole.ch ([5.9.57.43]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qQmlt-000BJw-2x for pgsql-general@lists.postgresql.org; Tue, 01 Aug 2023 10:38:39 +0000 Received: from [213.55.226.167] (helo=[192.168.43.80]) by vilan-mail with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qQmls-0004P7-0C for pgsql-general@lists.postgresql.org; Tue, 01 Aug 2023 12:38:32 +0200 Message-ID: Date: Tue, 1 Aug 2023 12:38:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: error: connection to server on socket... To: pgsql-general@lists.postgresql.org References: <97d77785-22a0-5d48-9582-4a7beb2dc14f@gmail.com> Content-Language: en-GB From: Tomas Pospisek In-Reply-To: <97d77785-22a0-5d48-9582-4a7beb2dc14f@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 01.08.23 12:22, Amn Ojee Uw wrote: > Using the following command on my Debian 12 machine: > > sudo apt-get install postgresql postgresql-15 postgresql-client-common postgresql-common postgresql-contrib postgresql-doc phppgadmin > > and following the instruction on this > web page I have > installed PostgreSQL-15. > The installation went smooth, until the following command was issued : > > sudo -u postgres psql > > ... I get an error message that reads: > > could not change directory to "/home/my_account": Permission denied > psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory >     Is the server running locally and accepting connections on that socket? > > What can I do to resolve this issue? When executing the `sudo` command above: * as which user are you doing that (you can see that via `id`)? * in which directory are you executing it (you can see that via `pwd`)? * what is the home directory of the postgres user (you can see that via `grep postgres /etc/passwd`) * what does `ls -ld /var/run/postgresql/; ls -l /var/run/postgresql/.s.PGSQL.5432` show? You also wrote: > I tried this, but to no avail : `sudo systemctl start postgresql` - what does `journalctl -xeu postgresql` say? - what does `tail -n 20 /var/log/postgresql/postgresql-*-qgisclouddb.log` show? *t