Skip to main content
workaround
Source Link
300D7309EF17
  • 431
  • 1
  • 4
  • 6

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
 current_user
--------------
 dbadmin
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo

update 2 workaround:

Inspired by this question, if I change the database owner to the dbadmin account, I can at least create schemas as that user. Obviously it means fooadmin can't create schemas anymore. I suppose I could change the owner, create schemas, then change the owner back.

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
 current_user
--------------
 dbadmin
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
 current_user
--------------
 dbadmin
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo

update 2 workaround:

Inspired by this question, if I change the database owner to the dbadmin account, I can at least create schemas as that user. Obviously it means fooadmin can't create schemas anymore. I suppose I could change the owner, create schemas, then change the owner back.

update with 'select user'
Source Link
300D7309EF17
  • 431
  • 1
  • 4
  • 6

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
 current_user
--------------
 dbadmin
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.

update 1 for EvanC:

select user;
 current_user
--------------
 dbadmin
(1 row)

sdm=> create schema ff;
ERROR:  permission denied for database foo
Source Link
300D7309EF17
  • 431
  • 1
  • 4
  • 6

can't create schema as admin

I have a user dbadmin, which has the highest permissions possible in AWS RDS.

Using dbadmin I created a database, foo, owned by fooadmin.

As fooadmin, I can CREATE SCHEMA in that database. As dbadmin, I cannot, I get this error:

create schema ff;
ERROR:  permission denied for database foo

My dbadmin user certainly has access to this database:

grant create on database foo to dbadmin;
WARNING:  no privileges were granted for "foo"
GRANT

This is sort of the inverse of this question, which was asking how to elevate privileges for fooadmin.