Search Postgresql Archives

How does connect privilege works?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

 

I am trying to setup a cluster for trac databases and want to isolate each db, by assigning a specific user to a DB.

 

I followed the documentation but as shown in the following example, limiting access by connect does not seem to be working.

 

What am I missing?

 

------------

shridhar@bheem ~$ createuser testuser1

Shall the new role be a superuser? (y/n) n

Shall the new role be allowed to create databases? (y/n) y

Shall the new role be allowed to create more new roles? (y/n) y

 

shridhar@bheem ~$ createdb -O testuser1 testdb1

 

shridhar@bheem ~$ createdb testdb2

 

shridhar@bheem ~$ psql testdb2

psql (9.1.4)

Type "help" for help.

 

testdb2=# revoke connect ON database testdb2 FROM testuser1;

REVOKE

testdb2=# \q

shridhar@bheem ~$ psql -U testuser1 testdb2

psql (9.1.4)

Type "help" for help.

 

testdb2=> \q

 

 

shridhar@bheem ~$ psql test

psql (9.1.4)

Type "help" for help.

 

test=# select version();

version

---------------------------------------------------------------------------------------------------------

PostgreSQL 9.1.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.7.0 20120505 (prerelease), 64-bit

(1 row)

 

------------

--

Regards

Shridhar


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux