Re: Problem starting pgsql server on Mac OS X. Pg_hba.conf reading permission.

From: John DeSoi <desoi(at)pgedit(dot)com>
To: NNL <nextstopsun(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem starting pgsql server on Mac OS X. Pg_hba.conf reading permission.
Date: 2009-08-31 17:17:23
Message-ID: 4BF2EF36-E49E-4B50-885B-ABFBAD48F5D1@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 31, 2009, at 5:24 AM, NNL wrote:

> BigMac:~ postgres$ FATAL: data directory "/usr/local/pgsql/data"
> has group or world access
> DETAIL: Permissions should be u=rwx (0700).
>
> chmod 700 /usr/local/pgsql/data/
> BigMac:~ postgres$ /usr/local/pgsql/bin/pg_ctl start -D /usr/local/
> pgsql/data
>
> server starting
> BigMac:~ postgres$ LOG: could not open configuration file "/usr/
> local/pgsql/data/pg_hba.conf": Permission denied
> FATAL: could not load pg_hba.conf

Most likely because the user you are using (appears to be postgres
from the prompt) is not the owner of file (and database). This would
be the case if initdb was run as a different user than postgres. Run
"ls -al" to check. So your options are to change the ownership of the
files, or run as the user which already owns them. Something like

sudo -u username /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/
data

John DeSoi, Ph.D.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erwin Brandstetter 2009-08-31 17:54:48 Re: Import data from XML file
Previous Message Tim Landscheidt 2009-08-31 17:00:27 Re: Query and the number of row result