Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 414A09FB625 for ; Tue, 19 Jun 2007 22:32:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 53225-03 for ; Tue, 19 Jun 2007 22:32:13 -0300 (ADT) X-Greylist: delayed 00:21:58.741772 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 6CED29FB71F for ; Tue, 19 Jun 2007 22:32:21 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.herbers.ca (unknown [64.56.146.223]) by svr4.postgresql.org (Postfix) with ESMTP id 926B65AF04F for ; Wed, 20 Jun 2007 01:10:17 +0000 (GMT) Received: from localhost (trusty.herbers.ca [127.0.0.1]) by mail.herbers.ca (herbers) with ESMTP id C24F44F5AD for ; Tue, 19 Jun 2007 19:10:32 -0600 (MDT) X-Virus-Scanned: amavisd-new at herbers.ca Received: from mail.herbers.ca ([127.0.0.1]) by localhost (trusty.herbers.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vZ63i431NYO5 for ; Tue, 19 Jun 2007 19:10:32 -0600 (MDT) Received: from localhost (trusty.herbers.ca [127.0.0.1]) by mail.herbers.ca (herbers) with ESMTP id 45A644F5A4 for ; Tue, 19 Jun 2007 19:10:32 -0600 (MDT) Received: from admin51-35.macewan.ca (admin51-35.macewan.ca [198.161.51.35]) by www.herbers.ca (Horde MIME library) with HTTP; Tue, 19 Jun 2007 19:10:32 -0600 Message-ID: <20070619191032.vak14b2uz4csswog@www.herbers.ca> Date: Tue, 19 Jun 2007 19:10:32 -0600 From: James Herbers To: pgsql-admin@postgresql.org Subject: Re: initdb problem References: <46787c7e.5c.7231.660912604@ihug.co.nz> In-Reply-To: <46787c7e.5c.7231.660912604@ihug.co.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/191 X-Sequence-Number: 25859 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 : > 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 >