Installation docs wrong?

Started by Christopher Kings-Lynnealmost 21 years ago4 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

On this page:

http://www.postgresql.org/docs/8.0/interactive/creating-cluster.html

It has this sequence:

root# mkdir /usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data

However, initdb will fail in this case, since the /usr/local/pgsql dir
is NOT owned by postgres. (This came up on IRC helping someone)

Should it in fact be:

root# chown -R postgres /usr/local/pgsql

Chris

#2Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Christopher Kings-Lynne (#1)
Re: Installation docs wrong?

Sorry, on further investigation this seems to work for everyone except
that guy - weird.

Chris

Christopher Kings-Lynne wrote:

Show quoted text

On this page:

http://www.postgresql.org/docs/8.0/interactive/creating-cluster.html

It has this sequence:

root# mkdir /usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data

However, initdb will fail in this case, since the /usr/local/pgsql dir
is NOT owned by postgres. (This came up on IRC helping someone)

Should it in fact be:

root# chown -R postgres /usr/local/pgsql

Chris

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#3Michael Fuhr
mike@fuhr.org
In reply to: Christopher Kings-Lynne (#1)
Re: Installation docs wrong?

On Fri, Mar 25, 2005 at 12:30:46PM +0800, Christopher Kings-Lynne wrote:

root# mkdir /usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data

However, initdb will fail in this case, since the /usr/local/pgsql dir
is NOT owned by postgres. (This came up on IRC helping someone)

This should work. What's the exact error? Have you check the
permissions on all parent directories? What's the output of the
following command?

ls -ld / /usr /usr/local /usr/local/pgsql /usr/local/pgsql/data

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Installation docs wrong?

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

On this page:
http://www.postgresql.org/docs/8.0/interactive/creating-cluster.html

It has this sequence:

root# mkdir /usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
postgres$ initdb -D /usr/local/pgsql/data

However, initdb will fail in this case, since the /usr/local/pgsql dir
is NOT owned by postgres. (This came up on IRC helping someone)

That doesn't matter per se. But I wonder if /usr/local/pgsql was set up
as not world readable.

regards, tom lane