Re: Permissions or initdb failure? - Mailing list pgsql-cygwin

From Jason Tishler
Subject Re: Permissions or initdb failure?
Date
Msg-id 20030220144141.GH1744@tishler.net
Whole thread Raw
In response to Permissions or initdb failure?  ("Tom Halser" <tom@halser.com>)
List pgsql-cygwin
Tom,

Please keep your replies on-list.

On Wed, Feb 19, 2003 at 09:07:16AM +0100, Tom Halser wrote:
> okay. did chmod 715 to 'postgres.exe'
> After that initdb had the same problem with 'pg_id.exe'.
> So I did 'chmod 715 /usr/bin/pg_*' in hope this would fix all permission
> problems.

A mode of 715 is weird -- I would use 755.

> Running initdb now results this:
> $ initdb -D /var/lib/pgsql/data
> The files belonging to this database system will be owned by user
> "postgres".
> This user must also own the server process.
>
> The database cluster will be initialized with locale C.
>
> Fixing permissions on existing directory /var/lib/pgsql/data... ok
> creating directory /var/lib/pgsql/data/base... ok
> creating directory /var/lib/pgsql/data/global... ok
> creating directory /var/lib/pgsql/data/pg_xlog... ok
> creating directory /var/lib/pgsql/data/pg_clog... ok
> creating template1 database in /var/lib/pgsql/data/base/1... ok
> creating configuration files... ok
> initializing pg_shadow... LOG:  FindExec: invalid binary
> "/usr/bin/postgres"
> FATAL:  /usr/bin/postgres: could not locate executable, bailing out...
>
> initdb failed.
>
> The account 'postgres' has ordinary 'user' rights, should that be
> Administrator?

No, all of my postgres users are just in Users.

> What I really don't understand is that I already installed Postgres on
> another XP Prof machine the same way and everything work perfect.
> Strange.

My WAG is that the permissions of /usr/bin is whacked (i.e., not 777 or
at least 755) which is causing Cygwin's setup.exe to install *.exe and
*.dll files with bad permissions.

Try to fix your permissions with the following:

    $ chmod 755 /usr/bin
    $ chmod 755 /usr/bin/*.exe /usr/bin/*.dll

Does initdb work now?

> Thanks for your support!

You are welcome.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

pgsql-cygwin by date:

Previous
From: Jason Tishler
Date:
Subject: Re: What could be the cause?
Next
From: "Yann.G"
Date:
Subject: Re: What could be the cause?