From: | "Chad R(dot) Larson" <chad(at)eldocomp(dot)com> |
---|---|
To: | Oleg Lebedev <olebedev(at)waterford(dot)org>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Postmaster startup |
Date: | 2001-10-07 18:23:36 |
Message-ID: | 4.2.2.20011007111640.00a77ce0@smtp.eldocomp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
Attachment | Content-Type | Size |
---|---|---|
postgres | text/plain | 2.6 KB |
unknown_filename | text/plain | 182 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ferdinand Smit | 2001-10-08 12:49:27 | Query stats |
Previous Message | Chad R. Larson | 2001-10-07 17:59:30 | Re: about the time of a process |