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 1rT6Or-000RFO-Mz for pgsql-general@arkaria.postgresql.org; Thu, 25 Jan 2024 20:32:38 +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 1rT6Oq-003R2h-K5 for pgsql-general@arkaria.postgresql.org; Thu, 25 Jan 2024 20:32:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT6Oo-003R2Y-Sa for pgsql-general@lists.postgresql.org; Thu, 25 Jan 2024 20:32:36 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rT6Ol-003MFc-LQ for pgsql-general@lists.postgresql.org; Thu, 25 Jan 2024 20:32:33 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 56C623200AB5; Thu, 25 Jan 2024 15:32:28 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Thu, 25 Jan 2024 15:32:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1706214747; x=1706301147; bh=PBtp6i7qdR+oPZgcMQJksta6qImnqPPnzBCn64XZc+w=; b= kEuNOTOBAErn4JAbYwdByQYLsCJeuxRUqz2KC+dzpxFUFXGEoBuFQndBGH4bRBmN czE1t7hySjSB1LzXtQ6f9RWHGFZUK/tQvuNXcQuz1iXU2B7Qc5Njc1mgo8O3XWgQ AGaXAzvrxaoz3oX3u4YK8uP087ZkT4PZsl03hMSGy5ZjZwC6GWZ02QecQuQecxw4 IC1M17Vd2if3dfMecmgQWBwNpG8r8YwprRc8BXy7H4rRABOWxSEKlufsmJJvylXp k5pMOiVFsyrCuApHh7/QCJPjyLa0KX1O/dsiwST3zWgYEFRGnpfrcyN7MRb14yYq qDm8j+9ciao8H8Bog1nr8Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1706214747; x= 1706301147; bh=PBtp6i7qdR+oPZgcMQJksta6qImnqPPnzBCn64XZc+w=; b=X S6W+lkWOZT/Vc8auxiiEAtzMeaweS14454WAf9u2jLaJxOJ/Cu7u1jzrS6uB7p2b bEfCBhRvQC/aqzHQn+Tm26d+q+L0lMijMScMcxuE7A9dFnDRKrF82xZfB+p979BS 1amu+dLWVJvF0Hjprt2hmib7zdiKsQ5kqahKERpF68MHLC8d3zZ3fm0qFvcpwL82 avznt9FuZtrTmjGL2iAPE6JwhuvwPeKrDHuM7mDqfLLPpwLBFRZH0rWTp/GSafEL FMTNp8zqmNVXQ8jtDs5SI/iBxyf02eLsEhTx2aZOHqTJma5UUY3NLNDPvr2zFeWn ndvQ2IEQ3bvRDQ/3cCT4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelhedggeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleek vdelkeehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jan 2024 15:32:26 -0500 (EST) Message-ID: Date: Thu, 25 Jan 2024 12:32:25 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: permission denied on socket To: Atul Kumar , pgsql-general References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/25/24 12:22, Atul Kumar wrote: > Hi, > > I have postgres 13 running on centos 7. > > I am facing an issue while trying to connect the cluster using the below > command. > > -bash-4.2$ psql postgres > > psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: > Permission denied With the Postgres server running does: /tmp/.s.PGSQL.5432 exist? > > Is the server running locally and accepting connections on that socket? > > > but when I am trying to connect using the below command I am able to > login to the cluster successfully. > > -bash-4.2$ psql postgres -h localhost > > postgres=# The above works because you are not connecting to local(the socket), but to localhost(127.0.0.1 or ::1). > > > I am not sure what is causing this issue and what needs to be done to > resolve it ? Best guess is you are using a version of psql that is expecting the socket to be somewhere else then where it actually is. > > > Regards. > > > -- Adrian Klaver adrian.klaver@aklaver.com