pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Srinivas Kotapally <ksrinivas@coriendo.com>
To: 'James Herbers' <james@herbers.ca>
To: pgsql-admin@postgresql.org
Subject: Re: initdb problem
Date: Tue, 19 Jun 2007 21:55:45 -0400
Message-ID: <022401c7b2de$1e518010$0401a8c0@srinilaptop> (raw)
In-Reply-To: <20070619191032.vak14b2uz4csswog@www.herbers.ca>
References: <46787c7e.5c.7231.660912604@ihug.co.nz>
	<20070619191032.vak14b2uz4csswog@www.herbers.ca>

Seems to be a permissions problem, make sure your /Library/postgreSQL8/
directory is owned by the postgres user.  If you installed using binaries as
root you have to chown /Library/postgreSQL8/ -R (this is what you do in Linux).

Hope that helps.

S 

-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org]
On Behalf Of James Herbers
Sent: Tuesday, June 19, 2007 9:11 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] initdb problem

No MAC expert but try this when changing to the postgres user:
    su - postgres
the hyphen gives you an environment for the postgres user.

J. Herbers

Quoting Joe Barwell <jbar@es.co.nz>:

> Hello people,
>
> Having installed the universal binary for pg 8.2.4 on my mac running 
> 10.3.9, I'm now trying to use the initdb command, but keep running 
> into problems. I can't seem to get the right syntax. Can anyone 
> suggest where I'm going wrong?
> Here's what terminal shows:
>
> Acorn acorn 1 acorn$ login root
> Password:
> Last login: Thu Jun 14 13:43:54 on ttyp1 Welcome to Darwin!
> Acorn:~ root# su postgres
> shell-init: could not get current directory: getcwd: cannot access 
> parent directories: Permission denied
> su: /dev/null/.bashrc: Not a directory Acorn:/var/root postgres$ 
> initdb -D /Library/PostgreSQL8/data
> su: initdb: command not found
> Acorn:/var/root postgres$ cd
> chdir: could not get current directory: getcwd: cannot access parent 
> directories: Permission denied
> su: cd: /dev/null: Not a directory
> Acorn:/var/root postgres$ cwd
> su: cwd: command not found
> Acorn:/var/root postgres$ /Library/PostgreSQL8/initdb -D 
> /Library/PostgreSQL8/data
> su: /Library/PostgreSQL8/initdb: No such file or directory 
> Acorn:/var/root postgres$ /Library/PostgreSQL8/bin/initdb -D 
> /Library/PostgreSQL8/data could not identify current directory: 
> Permission denied could not identify current directory: Permission 
> denied could not identify current directory: Permission denied The 
> program "postgres" is needed by initdb but was not found in the same 
> directory as "initdb".
> Check your installation.
> Acorn:/var/root postgres$
>
> TIA,
>
> Joe
>
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>




---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly




view thread (26+ messages)  latest in thread

Message-ID: <022401c7b2de$1e518010$0401a8c0@srinilaptop>
Permalink:  ../022401c7b2de$1e518010$0401a8c0@srinilaptop/
Also on:    postgresql.org/message-id/022401c7b2de$1e518010$0401a8c0@srinilaptop

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ksrinivas@coriendo.com, james@herbers.ca
  Subject: Re: initdb problem
  In-Reply-To: <022401c7b2de$1e518010$0401a8c0@srinilaptop>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox