Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f4RH52A84143 for ; Sun, 27 May 2001 13:05:02 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f4RH4QR27240; Sun, 27 May 2001 13:04:26 -0400 (EDT) To: Melvyn Sopacua cc: PostgreSQL Adminlist Subject: Re: Postgres and chroot In-reply-to: <5.0.2.1.2.20010527181355.03ff1ec0@tmp.idg.nl> References: <5.0.2.1.2.20010527181355.03ff1ec0@tmp.idg.nl> Comments: In-reply-to Melvyn Sopacua message dated "Sun, 27 May 2001 18:14:08 +0200" Date: Sun, 27 May 2001 13:04:26 -0400 Message-ID: <27237.990983066@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/148 X-Sequence-Number: 1505 Melvyn Sopacua writes: > 1) Postgres requires me to have 'su' in the chrooted env Postgres itself doesn't use su. Surely you can figure out a way to run a program as non-root inside the chroot area (login, maybe)? There's nothing that says you have to use that particular start script. > 2) Postgres makes a shell call to the 'cp' command when creating new databases. Yup. Live with it, or reimplement recursive cp in CREATE DATABASE. Don't forget 'rm' too for DROP DATABASE. I don't really see the point though; why shouldn't cp/rm be available inside the chroot playpen? > -- Does anybody run PostgreSQL chrooted and so, how? I'm pretty sure uunet is running multiple Postgreses chrooted to different places on the same system. However, I wonder if you aren't adopting a MySQL-driven worldview in assuming that you need to do this in the first place. Since Postgres doesn't run as root, and doesn't expose any filesystem access capability to non-superusers, the need to put it in a chroot playpen seems much less to me. regards, tom lane