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 1kqFSn-0005HK-Rq for pgsql-admin@arkaria.postgresql.org; Fri, 18 Dec 2020 13:06:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kqFSm-0004uo-Kk for pgsql-admin@arkaria.postgresql.org; Fri, 18 Dec 2020 13:06:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqFSm-0004ub-Ac for pgsql-admin@lists.postgresql.org; Fri, 18 Dec 2020 13:06:28 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kqFSj-0005YD-Tm for pgsql-admin@postgresql.org; Fri, 18 Dec 2020 13:06:27 +0000 Received: by mail-qt1-x834.google.com with SMTP id z3so1158382qtw.9 for ; Fri, 18 Dec 2020 05:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=OtPdqNJIG7KAhSyLdHn7lCdk4Sv3vBSyzQ53z+/qMcg=; b=GiUbrTSKZ1hFeLgfCSllvn47+SnA5YHFAwcDCZBMQ+VMyIxCXXKfdLIG14PggerR3e gK1SmYIWKYZ9/ENyFYkuki65VyLc+hSi4Kmc3NcjiGMsySP+5mC6Lpsb8iy6rWG4gPrN iurq/IigMzXYwGLXczIdZHlJVWJyAUnMyFwtkcOMFFroRsrKgkoW6+lRts8TlGNl6Pca Btf8m+5sFHcxtEqcIP+iVG0Kmysz+xc39zGgLWN8y9tmHhbigfKZAUu9viMPT7VOXDFQ BNrIPlGUbbJxnj7yChwm5inG56ZdPi2J0PfTNPsMwPE7kar6bLRm9VQIvZgW7miDkNnf TsUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=OtPdqNJIG7KAhSyLdHn7lCdk4Sv3vBSyzQ53z+/qMcg=; b=pw4P+ofZ1ZSW3x4KbVK1XHZyUTX2qHqb34zrj0ATEAE6bzhy7w6XSuaxBKEOIGNtc3 zQEHE7k6lSr7GvxTQoQAS3t4KpB9IZcxANWrFni1m/yMYYI9xCd8Mr4oquk2V6svRgR3 RmEsvMjAgPhu7BOmf9PNAKyfpjW9xmYiYYLGHp7ROJ31ypFMF2quWWbz2KrnnDuo3LWJ klBN6J5MMvLO5Lwhdg/J9BqzvaVnYpAkMW9r3tB8rGwJ2kTt+y4Mn41efoAz1p8+JeB5 u3e7ltqLJW8wX7dDhlbkEutb2fpPjZXYfpUjPGYtJWgMrOlJFaRAzorCXo7g+47HrYwq 6v0Q== X-Gm-Message-State: AOAM5338AGRQwEu5VTBwyYjRRN3n8h5dV+wP1GTkwB3CUFF+9KIhcOvs P85bBycj2Wdk95E1m1Ex3L4= X-Google-Smtp-Source: ABdhPJwB7TD2WpWvsCX6Ri82AiD2vrXljkrtkvP8UvNxslLsnOvrS5mWRXSyIQo3j5TOsok3TJ38RQ== X-Received: by 2002:ac8:58d1:: with SMTP id u17mr3832084qta.158.1608296784843; Fri, 18 Dec 2020 05:06:24 -0800 (PST) Received: from [192.168.254.67] (h178.165.133.40.static.ip.windstream.net. [40.133.165.178]) by smtp.gmail.com with ESMTPSA id b67sm5240445qkc.44.2020.12.18.05.06.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Dec 2020 05:06:24 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: John Scalia Mime-Version: 1.0 (1.0) Subject: Re: User granted all access to schema, but can't see tables Date: Fri, 18 Dec 2020 08:06:22 -0500 Message-Id: <84A1EF6D-B514-40BD-818C-D040D26CE6A5@gmail.com> References: <43309465-eb73-557c-8941-ddad7e31a5ff@gmail.com> Cc: pgsql-admin In-Reply-To: <43309465-eb73-557c-8941-ddad7e31a5ff@gmail.com> To: Ron X-Mailer: iPad Mail (18B92) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Try doing a \dpp and see if the table contains a line for the s= tansuser. Perhaps there was a problem with the default privileges. Oh, and c= ase you didn=E2=80=99t know this, newly set default privileges only effect a= n object created after the fact, they do not alter privileges for any existi= ng object. Sent from my iPad > On Dec 18, 2020, at 7:57 AM, Ron wrote: >=20 > =EF=BB=BFThe database name is "sides", as show in the psql prompt. User "= stransuser" can connect to the database as shown below when it tries to quer= y tables but gets "permission denied". >=20 >> On 12/18/20 6:26 AM, John Scalia wrote: >> Does the stansuser have connect privileges to the actual database where t= he schema and tables are? >>=20 >> GRANT connect ON DATABASE TO stansuser; >>=20 >> Note that since you didn=E2=80=99t tell us what the database name is here= , you=E2=80=99ll need to substitute the actual name of it where I indicated <= stans_whatever>. >> =E2=80=94 >> Jay >>=20 >> Sent from my iPad >>=20 >>>> On Dec 18, 2020, at 7:07 AM, Ron wrote: >>>=20 >>> =EF=BB=BFThis is v12 from RHEL repos. >>>=20 >>> As user postgres, I run: >>>=20 >>> sides=3D# grant all on SCHEMA strans TO stransuser; >>> GRANT >>>=20 >>> sides=3D# ALTER DEFAULT PRIVILEGES IN SCHEMA strans GRANT all on tables t= o stransuser; >>> ALTER DEFAULT PRIVILEGES >>>=20 >>> sides=3D# GRANT USAGE ON SCHEMA strans TO stransuser; >>> GRANT >>>=20 >>> But user stransuser still can=E2=80=99t access tables >>>=20 >>> sides=3D> \d >>> List of relations >>> Schema | Name | Type | Owner >>> --------+------------+----------+---------- >>> strans | foo | table | postgres >>> strans | foo_id_seq | sequence | postgres >>> (2 rows) >>>=20 >>> sides=3D> select * from strans.foo; >>> ERROR: permission denied for table foo >>>=20 >>> sides=3D> \z strans.foo >>> Access privileges >>> Schema | Name | Type | Access privileges | Column privileges | P= olicies >>> --------+------+-------+---------------------------+-------------------+= ---------- >>> strans | foo | table | postgres=3DarwdDxt/postgres+| |= >>> | | | READWRITE=3DarwdD/postgres +| |= >>> | | | READONLY=3Dr/postgres | | >>> (1 row) >>>=20 >>> What am I missing? >>>=20 >>> --=20 >>> Angular momentum makes the world go 'round. >>>=20 >>>=20 >=20 > --=20 > Angular momentum makes the world go 'round. >=20 >=20