From: Tom Lane <tgl@sss.pgh.pa.us>
To: Melvyn Sopacua <mdev@idg.nl>
Cc: PostgreSQL Adminlist <pgsql-admin@postgresql.org>
Subject: Re: Postgres and chroot
Date: Sun, 27 May 2001 13:04:26 -0400
Message-ID: <27237.990983066@sss.pgh.pa.us> (raw)
In-Reply-To: <5.0.2.1.2.20010527181355.03ff1ec0@tmp.idg.nl>
References: <5.0.2.1.2.20010527181355.03ff1ec0@tmp.idg.nl>
Melvyn Sopacua <mdev@idg.nl> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, mdev@idg.nl
Subject: Re: Postgres and chroot
In-Reply-To: <27237.990983066@sss.pgh.pa.us>
References: <5.0.2.1.2.20010527181355.03ff1ec0@tmp.idg.nl> <27237.990983066@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox