By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

I want to use phpPgadmin (the web based tool for postgresql) but I have a problem!

P: 61
the problem is:
when I create a user "user1" and give the permissions on the database "db1" to it (including login privilage),

this user can access to all databases although it doesn't have the privilges (I make revoke )

in other side, any user can access to the database "db1"
after login, although I make (revoke all on db1 from public).

I tryed to fix this problem alot but I didn't fined any way.

help me please.

and thanks for you...
Sep 14 '10 #1
Share this Question
Share on Google+
4 Replies


Expert 100+
P: 700
I guess you did
Expand|Select|Wrap|Line Numbers
  1. revoke all on database db1 from public
  2.  
not
Expand|Select|Wrap|Line Numbers
  1. revoke all on db1 from public
  2.  
because the second query revokes premissions from a table db1 not database db1.

Am I right?
Sep 14 '10 #2

P: 61
the problem still exists after execute the statment:
"revoke all on database db1 from public"

user1 can access to other databases although it is owner to the db1 only!!

thank you very much.
Sep 15 '10 #3

Expert 100+
P: 700
I do not understand. You revoke all rights from db1 database and you expect user will not be able to connect to OTHER databases?

If you want to forbid user from accessing database X you must revoke connect on that database X from that user (and public 'role'). So you must revoke connect from public on all database you want to restrict access.
BTW if you do that you should add connect rights to all user personally which you want to access that databases.

Sorry for not so good english, I hope you understand what I mean.
Sep 15 '10 #4

P: 61
I need to restrict role "user1" to access only db1 and db2's sch_a and shc_f, and also don't show the other schemas in the same database. When listing databases, just tow schemas should be shown (sch_a , sch_f).
I wish the problem has been clear to you.
thanks alot.
Sep 16 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.