On 04/24/12 05:31, nap...@squareownz.org wrote: > On Tue, Apr 24, 2012 at 06:27:22AM +0100, Graham Murray wrote: >> nap...@squareownz.org writes: >> >>> Postgres doesn't have a home directory and if I create one and chown it >>> postgres:postgres I still can't do anything. I'm totally at a loss here. >> >> Postgres should have a home directory - /var/lib/postgresql >> >> If you run su - postgres, this is the directory you should be in. >> > Ah okay, I've changed it back to this then. I do indeed enter there now. > I've emerged it without threads or pam as I suspected it may have been > either of them but that hasn't seemed to solve much of anything. > > The current error I'm getting is: > # /etc/init.d/postgresql-9.1 start > * Starting PostgreSQL ... > * start-stop-daemon: did not create a valid pid in > * `/var/lib/postgresql/9.1/data/postmaster.pid' > * Check the PostgreSQL 9.1 log for a detailed explanation of the > * above error. [ !! ] > > Which is what happens when start-stop-daemon fails to execute its > command. I'm not entirely sure what start-stop-daemon is or what > permissions it may need or be missing so I'm about to look into that. >
Is everything under (and including) /var/lib/postgresql owned by postgres:postgres? ~ # ls /var/lib/postgresql/9.1 total 4.0K drwx------ 13 postgres postgres 4.0K 2012-04-23 18:58 data ~ # ls /var/lib/postgresql/9.1/data/ total 1.2M -rw------- 1 postgres postgres 4 2012-02-14 00:14 PG_VERSION drwx------ 7 postgres postgres 4.0K 2012-04-23 10:31 base drwx------ 2 postgres postgres 4.0K 2012-04-23 18:59 global drwx------ 2 postgres postgres 4.0K 2012-02-14 00:14 pg_clog drwx------ 4 postgres postgres 4.0K 2012-02-14 00:14 pg_multixact drwx------ 2 postgres postgres 4.0K 2012-04-23 18:58 pg_notify drwx------ 2 postgres postgres 4.0K 2012-02-14 00:14 pg_serial drwx------ 2 postgres postgres 4.0K 2012-04-24 09:57 pg_stat_tmp drwx------ 2 postgres postgres 4.0K 2012-04-20 13:42 pg_subtrans drwx------ 2 postgres postgres 4.0K 2012-02-14 00:14 pg_tblspc drwx------ 2 postgres postgres 4.0K 2012-02-14 00:14 pg_twophase drwx------ 3 postgres postgres 4.0K 2012-04-23 11:36 pg_xlog -rw------- 1 postgres postgres 1.1M 2012-04-24 09:55 postmaster.log -rw------- 1 postgres postgres 134 2012-04-23 18:58 postmaster.opts -rw------- 1 postgres postgres 92 2012-04-23 18:58 postmaster.pid