BUG #2993: The program "postgres" is needed by initdb but was not found ...

Lists: pgsql-bugs
From: "Filippo Toso" <filippotoso(at)libero(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-12 10:06:36
Message-ID: 200702121006.l1CA6aR4078537@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2993
Logged by: Filippo Toso
Email address: filippotoso(at)libero(dot)it
PostgreSQL version: 8.2.3
Operating system: Windows 2000 SP4
Description: The program "postgres" is needed by initdb but was not
found ...
Details:

Hi,
I have downloaded the postgresql-8.2.3-1-binaries-no-installer.zip package.

I have extracted it into C:\pgsql, I have created the C:\pgsql\data and then
I have executed the following command (as Administrator):

C:\pgsql\bin\initdb.exe -D C:\pgsql\data

With the following result:

###########################################################################
The program "postgres" is needed by initdb but was not found in the
same directory as "C:/pgsql/bin/initdb.exe".
Check your installation.
###########################################################################

The "postgres" command is in the "C:/pgsql/bin/" folder and if I execute
"C:\pgsql\bin\postgres.exe -V" I get:

postgres (PostgreSQL) 8.2.3

If I execute the same command as a low privileged user initdb works
correctly.

Accordingly to the initdb.c CVS log this problem should have been solved one
year ago with Revision 1.108.

Do you think this is a bug or there is something I'm doing wrong?

Sincerely,
Filipo Toso


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Filippo Toso <filippotoso(at)libero(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-12 20:03:09
Message-ID: 45D0C7FD.4060709@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Filippo Toso wrote:
> The following bug has been logged online:
>
> Bug reference: 2993
> Logged by: Filippo Toso
> Email address: filippotoso(at)libero(dot)it
> PostgreSQL version: 8.2.3
> Operating system: Windows 2000 SP4
> Description: The program "postgres" is needed by initdb but was not
> found ...
> Details:
>
> Hi,
> I have downloaded the postgresql-8.2.3-1-binaries-no-installer.zip package.
>
> I have extracted it into C:\pgsql, I have created the C:\pgsql\data and then
> I have executed the following command (as Administrator):
>
> C:\pgsql\bin\initdb.exe -D C:\pgsql\data
>
> With the following result:
>
> ###########################################################################
> The program "postgres" is needed by initdb but was not found in the
> same directory as "C:/pgsql/bin/initdb.exe".
> Check your installation.
> ###########################################################################
>
> The "postgres" command is in the "C:/pgsql/bin/" folder and if I execute
> "C:\pgsql\bin\postgres.exe -V" I get:
>
> postgres (PostgreSQL) 8.2.3
>
> If I execute the same command as a low privileged user initdb works
> correctly.
>
> Accordingly to the initdb.c CVS log this problem should have been solved one
> year ago with Revision 1.108.
>
> Do you think this is a bug or there is something I'm doing wrong?

Can you check the permissions on your pgsql directory? If your account
only has permissions through the admin or power users group, you will
need to grant it explicit permissions (since it gives up admin and power
users when it starts)

//Magnus


From: "Filippo Toso" <filippotoso(at)libero(dot)it>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-12 20:08:11
Message-ID: 000001c74ee1$86691430$0000fea9@humanprofile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Dear Magnus,

> Can you check the permissions on your pgsql directory? If your account
> only has permissions through the admin or power users group, you will
> need to grant it explicit permissions (since it gives up admin and power
> users when it starts)
>
> //Magnus

The pgsql directory privileges are set to Everyone (Full Control).

Sincerely,
Filippo Toso


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Filippo Toso <filippotoso(at)libero(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-14 11:04:03
Message-ID: 20070214110403.GB26194@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Mon, Feb 12, 2007 at 09:08:11PM +0100, Filippo Toso wrote:
> Dear Magnus,
>
> > Can you check the permissions on your pgsql directory? If your account
> > only has permissions through the admin or power users group, you will
> > need to grant it explicit permissions (since it gives up admin and power
> > users when it starts)
> >
> > //Magnus
>
> The pgsql directory privileges are set to Everyone (Full Control).

Hmm. Bummer. I really thought that was it. Can you check the full
directory tree up to the root directory as well, to see if there's
someplace else there where the user couldn't get in withotu admin/pu?

//Magnus


From: "Filippo Toso" <filippotoso(at)libero(dot)it>
To: "'Magnus Hagander'" <magnus(at)hagander(dot)net>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-14 12:49:43
Message-ID: 000001c75036$9ad3b410$a73d1997@humanprofile
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Dear Magnus,

> > The pgsql directory privileges are set to Everyone (Full Control).
>
> Hmm. Bummer. I really thought that was it. Can you check the full
> directory tree up to the root directory as well, to see if there's
> someplace else there where the user couldn't get in withotu admin/pu?

The directory structure is the following:

C:\pgsql\bin\initdb.exe
C:\pgsql\bin\postgres.exe

I have logged out and re-logged in as an user of Users group. As this user I
can create/edit/delete all the files and directories in all the folders and
subfolders of C:\pgsql\, I can start C:\pgsql\bin\initdb.exe and it works
perfectly. If I try to do the same as Administrator, it fails.

Sincerely,
Filippo Toso


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Filippo Toso <filippotoso(at)libero(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2993: The program "postgres" is needed by initdb but was not found ...
Date: 2007-02-14 18:06:06
Message-ID: 20070214180606.GH26194@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Feb 14, 2007 at 01:49:43PM +0100, Filippo Toso wrote:
> Dear Magnus,
>
> > > The pgsql directory privileges are set to Everyone (Full Control).
> >
> > Hmm. Bummer. I really thought that was it. Can you check the full
> > directory tree up to the root directory as well, to see if there's
> > someplace else there where the user couldn't get in withotu admin/pu?
>
> The directory structure is the following:
>
> C:\pgsql\bin\initdb.exe
> C:\pgsql\bin\postgres.exe
>
> I have logged out and re-logged in as an user of Users group. As this user I
> can create/edit/delete all the files and directories in all the folders and
> subfolders of C:\pgsql\, I can start C:\pgsql\bin\initdb.exe and it works
> perfectly. If I try to do the same as Administrator, it fails.

This sounds a lot like the user is getting the permissions through
Administrators or Power Users. Note that Administrators !=
Administrator. If permissions are set with the group only, you will get
the error.

//Magnus