X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7118F3A5FA3 for ; Thu, 13 Jan 2005 21:11:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17122-07 for ; Thu, 13 Jan 2005 21:10:57 +0000 (GMT) Received: from mxsf03.cluster1.charter.net (mxsf03.cluster1.charter.net [209.225.28.203]) by svr1.postgresql.org (Postfix) with ESMTP id 692233A5D3E for ; Thu, 13 Jan 2005 21:02:44 +0000 (GMT) Received: from mxip02.cluster1.charter.net (mxip02a.cluster1.charter.net [209.225.28.132]) by mxsf03.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id j0DL2hLm014355 for ; Thu, 13 Jan 2005 16:02:43 -0500 Received: from 24-159-243-214.jvl.wi.charter.com (HELO shiva) (24.159.243.214) by mxip02.cluster1.charter.net with ESMTP; 13 Jan 2005 16:02:43 -0500 X-Ironport-AV: i="3.88,121,1102309200"; d="scan'208"; a="546826213:sNHT12972152" Received: from quale by shiva with local (Exim 3.36 #1 (Debian)) id 1CpC8O-0007xT-00 for ; Thu, 13 Jan 2005 15:04:00 -0600 To: "PostgreSQL Admin" Subject: Re: Installing PostgreSQL as "postgress" versus "root" Debate! References: <4001DEAF7DF9BD498B58B45051FBEA650207AB73@25exch1.vicorpower.vicr.com> From: Doug Quale Date: 13 Jan 2005 15:04:00 -0600 In-Reply-To: <4001DEAF7DF9BD498B58B45051FBEA650207AB73@25exch1.vicorpower.vicr.com> Message-ID: <87r7kpujlr.fsf@charter.net> Lines: 37 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.032 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST X-Spam-Level: * X-Archive-Number: 200501/128 X-Sequence-Number: 15987 "Goulet, Dick" writes: > OK, Assume that the binaries are installed under root, but a > hacker cracks PostGres, what is to stop him/her from trashing all of the > database files in the first place? Their not owned by root. Installing > malware, whether it's actual code or destroying/defacing files causes > similar if not identical problems. At least their restricted to the > postgres user. And in my book the executables are of zero value whereas > the data files, and their contained data, are of infinite value. So > under your scheme we're protecting the least valuable part of the > system at the expense of the most valuable. OK, suppose that I follow your suggestion. Assume that the binaries are installed under postgres, but a hacker cracks postgres. What is to stop him/her from trashing all the database files in the first place? (Nothing.) How is this different than the traditional installation where the binaries are owned by root? (It isn't, it's exactly the same.) The answer to your question doesn't provide any distinction between the traditional installation and the installation you prefer. The risks to the data are identical either way, but the risk of a trojan is less for a traditional installation than for your installation. Malware isn't restricted to the postgres user if any postgres binary is ever invoked by any user other than postgres. This might happen with psql, for example. Even if it were restricted to the postgres user, malware might still be used to collect unencrypted passwords. This problem is not identical to the dangers faced by losing data. It's data loss plus an extra worry. I agree that data security is a much bigger concern than the threat of trojaned Postgresql binaries. You are wrong, however, to think that you gain any security by having Postgresql binaries owned by a user other than root. It can be convenient to install without requiring root authority, but this convenience comes at a cost. This cost is small enough so that you may be comfortable paying it, but you should at least correctly understand the tradeoffs involved.