Re: 7.1beta4 initdb problem - Mailing list pgsql-general

From Tom Lane
Subject Re: 7.1beta4 initdb problem
Date
Msg-id 7889.981345265@sss.pgh.pa.us
Whole thread Raw
In response to Re: 7.1beta4 initdb problem  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: 7.1beta4 initdb problem
List pgsql-general
Peter Eisentraut <peter_e@gmx.net> writes:
> Tim Barnard writes:
>> The program '/usr/local/pgsql/bin/postgres' needed by initdb does not
>> belong to PostgreSQL version 7.1beta4. Check your installation.

> Can you run 'sh -x initdb ...' and show me the output?  Some platform
> information would be useful as well.

Ah, I see the problem:

$ bin/postgres -V
postgres (PostgreSQL) 7.1beta4
$ su
Password:
# bin/postgres -V

"root" execution of the PostgreSQL server is not permitted.

The server must be started under an unprivileged userid to prevent
a possible system security compromise. See the INSTALL file for
more information on how to properly start the server.


Probably initdb should have its own check for being run as root;
this seems cleaner than reorganizing the checks in the postgres
executable.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: can't run on TCP/IP ports
Next
From: Tom Lane
Date:
Subject: Re: Aggregates and joined tables...