Re: [HACKERS] More initdb follies - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] More initdb follies
Date
Msg-id Pine.LNX.4.20.9912100300000.760-100000@localhost.localdomain
Whole thread Raw
In response to Re: [HACKERS] More initdb follies  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-hackers
On 1999-12-09, Oliver Elphick mentioned:

>   >I propose that I remove it, and that it instead be possible that you can
>   >do
>   >
>   >root# su -l postgres -c 'initdb ...'
> 
> You can already do this;  this example is from the Debian package installation

> It can be quite tricky, though, since there are a number of different su
> versions around.  I would prefer it if root were able to run initdb directly

Of course the user would actually invoke the su himself, so he better know
what his does.

> and set the ownerships as part of the process.  The ability to run as root
> should only apply to initdb.

I don't think there is a good (let alone portable) way to set ownership of
a shell script at run time. While you could do all kinds of funny business
with file ownerships, the postgres backends will still refuse to execute.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Multibyte in autoconf
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] More initdb follies