Re: Issues starting database for the first time on Linux

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Isaac Braham <isaac(dot)o(dot)braham(at)gmail(dot)com>
Cc: pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Issues starting database for the first time on Linux
Date: 2019-12-04 13:16:46
Message-ID: 13321.1575465406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Isaac Braham <isaac(dot)o(dot)braham(at)gmail(dot)com> writes:
...
> chown postgres /usr/local/pgsql/data
> su - postgres
> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

> pg_ctl -D /usr/local/pgsql/data -l logfile start - leads to "waiting
> for server to start..../bin/sh: logfile: Permission denied stopped
> waiting pg_ctl: could not start server"

Apparently, you haven't got sufficient privilege to create "logfile".
Given that you just did "su - postgres", that seems to mean that
whatever directory is recorded as being postgres' home directory
(look in /etc/passwd to find out) isn't writable by postgres.
Or, maybe there already is a "logfile" there, but it's not
writable by postgres. Anyway, get the permissions straightened out,
or tell it to write to a log file located someplace else.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2019-12-04 14:51:02 Re: Issues starting database for the first time on Linux
Previous Message Isaac Braham 2019-12-04 10:46:59 Issues starting database for the first time on Linux