Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 16E01C76A5C for ; Sun, 26 Feb 2012 18:33:07 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S1meQ-0005Zm-2w for pgsql-bugs@postgresql.org; Sun, 26 Feb 2012 22:33:06 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1QMWrv8017387; Sun, 26 Feb 2012 17:32:53 -0500 (EST) To: linehanp@tcd.ie cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6488: Installation instructions slightly wrong. In-reply-to: References: Comments: In-reply-to linehanp@tcd.ie message dated "Sat, 25 Feb 2012 10:16:16 +0000" Date: Sun, 26 Feb 2012 17:32:53 -0500 Message-ID: <17386.1330295573@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/188 X-Sequence-Number: 32531 linehanp@tcd.ie writes: > The short version of the instructions say > ======================== > Short Version > ./configure > gmake > su > gmake install > adduser postgres > mkdir /usr/local/pgsql/data > chown postgres /usr/local/pgsql/data > su - postgres > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data > /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 & > /usr/local/pgsql/bin/createdb test > /usr/local/pgsql/bin/psql test > ================================= > but, there should be an "exit" between > the lines > chown postgres /usr/local/pgsql/data > su - postgres > otherwise, the system gets confused with > file permissions for the data directory > and throws the error > ========================== > FATAL: data directory "/usr/local/pgsql/data" has group or world access > ========================== You more than likely will have to adjust the permissions on the data directory when following this recipe, but I don't see how exiting from the first "su" there would fix it. All it's likely to do is add extra steps because you no longer have root permissions to do the second "su" with. regards, tom lane