X-Original-To: pgsql-admin@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id AE8FA925B41 for ; Mon, 26 May 2003 23:23:16 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 88749-10 for ; Mon, 26 May 2003 23:23:16 -0400 (EDT) Received: from smtp011.mail.yahoo.com (smtp011.mail.yahoo.com [216.136.173.31]) by developer.postgresql.org (Postfix) with SMTP id 9D13F925B3F for ; Mon, 26 May 2003 23:23:15 -0400 (EDT) Received: from pcp04100620pcs.neave01.pa.comcast.net (HELO yahoo.com) (renneyt@68.81.196.130 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 27 May 2003 03:23:14 -0000 Message-ID: <3ED2DA20.5050707@yahoo.com> Date: Mon, 26 May 2003 23:23:12 -0400 From: Renney Thomas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephan Szabo Cc: Matt Perry , pgsql-admin@postgresql.org Subject: Re: Restricting database access to certain users References: <20030526194806.F86210-100000@megazone23.bigpanda.com> In-Reply-To: <20030526194806.F86210-100000@megazone23.bigpanda.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/368 X-Sequence-Number: 8930 To make it easier, download pgadmin from pgadmin.postgresql.org. Get the latest one. Look into creating a schema. You may have created tables in the public schema. Create a different schema then grant create and usage permissions to it accordingly. Revoke the same from public. Stephan Szabo wrote: > On Mon, 26 May 2003, Matt Perry wrote: > > >>I'm looking into migrating several users from MySQL to Postgres and I'm >>running into a problem with security. I don't think I understand how >>security is handled within postgres. I'm using PostgreSQL v7.1.3 on a Red >>Hat 7.2 system. >> >>The problem is that there appears to not be a way to prevent users from >>accessing each other's databases and creating new objects in them. As a >>test, I created userB and userB and then created databaseA and databaseB. >>I then connected to databasea as usera and created a table with one row of >>data. I did the same with databaseb and userb. >> >>Next, I connected to databasea as userb and created a table. Sure enough, >>postgres allowed me to create the table in databasea as userb. Only userb >>could access this table. >> >>I wish to prevent such a situation. There doesn't seem to be a way to do >>so. I can grant and revoke permissions on tables but not on databases as >>a whole. > > > In 7.3 you can pretty much do what you want. You may want to look into > upgrading. > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >