mardi 2 décembre 2014

User with Connect privilege can create tables



postgres=# \list+
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace | Description
-----------+----------+----------+-------------+-------------+-----------------------+---------+------------+--------------------------------------------
our_database | alice | UTF8 | en_US.UTF-8 | en_US.UTF-8 | alice=CTc/our_database +| 16 MB | our_database_db |
| | | | | bob=c/our_database | | |


In the example above, bob should only be allowed to connect to our_database, nothing else. However, in reality, bob can create a table:



our_database=> CREATE TABLE test (id integer,name varchar(40));
CREATE TABLE
our_database=> DROP TABLE test;
DROP TABLE


Naughty. Am I missing something or does the access privilege 'c' (connect) imply table creation too?


Thanks.





Aucun commentaire:

Enregistrer un commentaire