pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15095: schema's owner can drop object's in his schema
2+ messages / 2 participants
[nested] [flat]

* BUG #15095: schema's owner can drop object's in his schema
@ 2018-03-02 09:14 PG Bug reporting form <noreply@postgresql.org>
  2018-03-02 14:46 ` Re: BUG #15095: schema's owner can drop object's in his schema Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2018-03-02 09:14 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: digoal@126.com

The following bug has been logged on the website:

Bug reference:      15095
Logged by:          Zhou Digoal
Email address:      digoal@126.com
PostgreSQL version: 10.2
Operating system:   centos 7.x x64
Description:        

Schema's owner can drop object's in his schema, I think this is an risk if
multi-user use the same schema. 

exp:

```
postgres=# create database pp owner postgres;
CREATE DATABASE
postgres=# grant create on database pp to pp;
GRANT
postgres=# \c pp pp
You are now connected to database "pp" as user "pp".
pp=> create schema abc;
CREATE SCHEMA
pp=> \c pp postgres
You are now connected to database "pp" as user "postgres".
pp=# create table abc.a(id int);
CREATE TABLE
pp=# insert into abc.a values (1);
INSERT 0 1
pp=# \c pp pp
You are now connected to database "pp" as user "pp".
pp=> select * from abc.a;
ERROR:  permission denied for relation a
pp=> drop table abc.a;
DROP TABLE
```

best regards,
digoal.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #15095: schema's owner can drop object's in his schema
  2018-03-02 09:14 BUG #15095: schema's owner can drop object's in his schema PG Bug reporting form <noreply@postgresql.org>
@ 2018-03-02 14:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-03-02 14:46 UTC (permalink / raw)
  To: digoal@126.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> Schema's owner can drop object's in his schema, I think this is an risk if
> multi-user use the same schema. 

This is not a bug, it's a documented behavior.  It's not much different
from the fact that a database owner can drop his database.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-03-02 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 09:14 BUG #15095: schema's owner can drop object's in his schema PG Bug reporting form <noreply@postgresql.org>
2018-03-02 14:46 ` Tom Lane <tgl@sss.pgh.pa.us>

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