Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A24709FB86C for ; Tue, 19 Jun 2007 22:55:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19962-04 for ; Tue, 19 Jun 2007 22:55:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by postgresql.org (Postfix) with ESMTP id 25BB69FB7E1 for ; Tue, 19 Jun 2007 22:55:49 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so2122ana for ; Tue, 19 Jun 2007 18:55:47 -0700 (PDT) Received: by 10.100.31.2 with SMTP id e2mr81255ane.1182304547705; Tue, 19 Jun 2007 18:55:47 -0700 (PDT) Received: from srinilaptop ( [72.94.185.146]) by mx.google.com with ESMTP id b11sm235121ana.2007.06.19.18.55.46 (version=SSLv3 cipher=RC4-MD5); Tue, 19 Jun 2007 18:55:47 -0700 (PDT) Reply-To: From: "Srinivas Kotapally" To: "'James Herbers'" , References: <46787c7e.5c.7231.660912604@ihug.co.nz> <20070619191032.vak14b2uz4csswog@www.herbers.ca> Subject: Re: initdb problem Date: Tue, 19 Jun 2007 21:55:45 -0400 Organization: Coriendo LLC Message-ID: <022401c7b2de$1e518010$0401a8c0@srinilaptop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acey2zA5FpG+L8RmRx25gMsT9k5DpgAAmKIQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 In-Reply-To: <20070619191032.vak14b2uz4csswog@www.herbers.ca> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/196 X-Sequence-Number: 25864 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 : > 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