Re: Postmaster startup

Поиск
Список
Период
Сортировка
От Chad R. Larson
Тема Re: Postmaster startup
Дата
Msg-id 4.2.2.20011007111640.00a77ce0@smtp.eldocomp.com
обсуждение исходный текст
Ответ на Postmaster startup  (Oleg Lebedev <olebedev@waterford.org>)
Список pgsql-admin
At 12:25 PM 10/5/01 -0600, Oleg Lebedev wrote:
>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 what am I doing wrong?

On many systems, SUID scripts are considered a security hole.  On
SysVr4-derived systems, the SUID bit on a script is silently ignored for
that reason.  If you're half-interested, go look at all the hoops PERL
jumps through to run SUID PERL scripts.

Anyway, attached is the script I use to start/stop Postgres on a Solaris
2.6 system.  Hope it helps.  The magic is the "su posgtres -c ..." part.

         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
   Eldorado Computing, Inc.   602-604-3100
      5353 North 16th Street, Suite 400
        Phoenix, Arizona   85016-3228

Вложения

В списке pgsql-admin по дате отправления:

Предыдущее
От: "lt"
Дата:
Сообщение: copy error?
Следующее
От: "Chad R. Larson"
Дата:
Сообщение: Re: Database access error after upgrade 7.1.2 -> 7.1.3