Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 11BE72E2EE6 for ; Thu, 17 Jan 2008 11:24:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 69503-01-2 for ; Thu, 17 Jan 2008 11:24:20 -0400 (AST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id E45632E2EFB for ; Thu, 17 Jan 2008 11:24:20 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JFWbB-0008Rp-S7 for pgsql-admin@postgresql.org; Thu, 17 Jan 2008 15:24:10 +0000 Received: from pirus.securax.be ([213.16.46.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2008 15:24:09 +0000 Received: from milen by pirus.securax.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Jan 2008 15:24:09 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: select only user Date: Thu, 17 Jan 2008 17:24:02 +0200 Lines: 29 Message-ID: References: <77335.88733.qm@web56407.mail.re3.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pirus.securax.be User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/203 X-Sequence-Number: 27977 Milen A. Radev написа: > Jessica Richard написа: >> I created a user and granted only "select" to this user so that this >> user can only select the tables on a production system. But by >> default, this user can also CREATE TABLE successfully.... >> >> How can I revoke this "create table" privilege (and possible others) >> and limit this user to only the permissions granted by me? >> > > Revoke the "create" privilege on the "public" schema (or any other > schema you've created) from 'public' (that's special "role"). Also > revoke the "create" privilege on the database(s) in question from the > same special role 'public' to prevent creation of new schemas. > > More here - http://www.postgresql.org/docs/current/static/sql-grant.html. Almost forgot - there is another way if the role in question would be read-only: ALTER USER username SET default_transaction_read_only to true; (http://archives.postgresql.org/pgsql-admin/2007-10/msg00101.php) -- Milen A. Radev