From: Ron Johnson <ron.l.johnson@cox.net>
To: pgsql-general@lists.postgresql.org
Subject: Ability to create tables
Date: Fri, 9 Mar 2018 17:13:48 -0600
Message-ID: <2b6740bf-cab4-6ddf-2928-665d632efb41@cox.net> (raw)
Hi,
Archaic v9.2.7
Even though I revoked the CREATE priv on role ABCREADONLY, it's still able
to create tables. What can I do to prevent this?
\c postgres
CREATE ROLE "ABCREADONLY" LOGIN INHERIT PASSWORD 'Flying.Fox';
GRANT CONNECT ON DATABASE "ABC123" TO "ABCREADONLY";
\c ABC123
GRANT USAGE ON SCHEMA public, ABC, tms TO "ABCREADONLY";
GRANT SELECT ON ALL TABLES IN SCHEMA public, ABC, tms TO "ABCREADONLY";
ALTER DEFAULT PRIVILEGES IN SCHEMA public, ABC, tms GRANT SELECT ON TABLES
TO "ABCREADONLY";
$ psql -c 'revoke create on database "ABC123" from "ABCREADONLY";'
REVOKE
$ psql -d ABC123 -U ABCREADONLY -c "create table bar (f1 integer);"
CREATE TABLE
$ psql -d ABC123 -U ABCREADONLY -c "\d bar"
Table "public.bar"
Column | Type | Modifiers
--------+---------+-----------
f1 | integer |
Thanks
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ron.l.johnson@cox.net
Subject: Re: Ability to create tables
In-Reply-To: <2b6740bf-cab4-6ddf-2928-665d632efb41@cox.net>
References: <2b6740bf-cab4-6ddf-2928-665d632efb41@cox.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox