Re: Postmaster startup - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: Postmaster startup
Date
Msg-id Pine.LNX.4.30.0110052030350.654-100000@peter.localdomain
Whole thread Raw
In response to Postmaster startup  (Oleg Lebedev <olebedev@waterford.org>)
List pgsql-admin
Oleg Lebedev writes:

> I have a script my_script that is run on startup, which has root
> permissions. From this script I want to start postgres script, which is
> owned by postgres (postgerSQL superuser) and has 's' bit set so that it
> executes with postgres priviledges. When I try to run my_script, I get
> an error:
> postmaster: real and effective userids must match

You should start the postmaster like this:

su -c 'postmaster -D ...' postgres

Setuid is not allowed because it introduces a security hole (on some
platforms anyway), coming from user-defined C functions.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Authorization problem
Next
From: "Brett W. McCoy"
Date:
Subject: Re: Postmaster startup