Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRgre-0002qK-Qw for pgsql-general@arkaria.postgresql.org; Mon, 13 Feb 2023 21:59:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRgrc-00025d-Vp for pgsql-general@arkaria.postgresql.org; Mon, 13 Feb 2023 21:59:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRgrc-00025U-Kx for pgsql-general@lists.postgresql.org; Mon, 13 Feb 2023 21:59:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRgrW-0007Nj-72 for pgsql-general@postgresql.org; Mon, 13 Feb 2023 21:59:56 +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 31DLxmvu1510084; Mon, 13 Feb 2023 16:59:48 -0500 From: Tom Lane To: Damian Carey cc: Postgresql Subject: Re: HOWTO? Permissions for user to access a single db In-reply-to: References: Comments: In-reply-to Damian Carey message dated "Tue, 14 Feb 2023 08:45:18 +1100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1510082.1676325588.1@sss.pgh.pa.us> Date: Mon, 13 Feb 2023 16:59:48 -0500 Message-ID: <1510083.1676325588@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Damian Carey writes: > We now need to provide access to an associate company to a single database > (3 tables, ~10k rows) that our java app writes to (not JDBC, via > Hibernate). We have a nice SSH tunnel coming in, but they cannot view the > shared database (yes, I'm an amateur). > I'm just looking for beginners suggestions to get this db visible to this > user so we can continue our trials. They have their own Linux user login, > and their SSH access gives them access to port 5432 and nothing else. They > can see postgres, but no databases are visible. What do you mean by "visible" ... that "select * from pg_database" shows only "postgres"? If so, the most likely theory is that they are not connecting to the same Postgres instance you are. There's not any permission-based filtering on what you can see in that catalog. regards, tom lane