Problem starting pgsql server on Mac OS X. Pg_hba.confreading permission.
Hello.
I=E2=80=99m having a problem starting server on mac os x.
-------------
bash-3.2$ /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data
server starting
bash-3.2$ LOG: could not open configuration file
"/usr/local/pgsql/data/pg_hba.conf": Permission denied
FATAL: could not load pg_hba.conf
-------------
The problem appears after changing permissions for /data folder in finder. I
did this:
I=E2=80=99m installing postgresql 8.4 from MacOS binary and it installs and=
starts
ok. Then I try to edit pg_hba.conf in pgAdmin3 to add a line
--------------
host all all 10.0.0.6 md5
--------------
After I click save icon to save a file it doesn=E2=80=99t save =E2=80=93 pr=
obably it doesn=E2=80=99t
have enough permission for that. So I go to my /usr/local/pgsql/data/ folder
in Finder =E2=80=93 unlock it=E2=80=99s permissions and set read/write to e=
veryone group.
Then I edit the pg_hba file with TextEdit.app and it looks like this
-------------
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 10.0.0.6 md5
# IPv6 local connections:
host all all ::1/128 trust
-------------
Then server doesn=E2=80=99t start =E2=80=93 start server.app exits with non=
-zero value.
Command line returns
-------------
BigMac:~ postgres$ FATAL: data directory "/usr/local/pgsql/data" has group
or world access
DETAIL: Permissions should be u=3Drwx (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
-------------
I=E2=80=99ve tried installing postgre from source thru fink, and the proble=
m stays
the same. I=E2=80=99m really stuck here, and I really need postgre to be ac=
cessed
from 10.0.0.6 machine.
What am I doing wrong? As I understand it=E2=80=99s a folder access permiss=
ion
problem, but I don=E2=80=99t know how to fix it. Can anyone PLEASE help me?=
--
View this message in context: http://www.nabble.com/Problem-starting-pgsql-=
server-on-Mac-OS-X.-Pg_hba.conf-reading-permission.-tp252207 84p25220784.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: Problem starting pgsql server on Mac OS X. Pg_hba.conf
2009/8/31 nextstopsun <nextstopsun [at] gmail.com>:
>
> Hello.
> I=92m having a problem starting server on mac os x.
>
> -------------
> bash-3.2$ /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data
> server starting
> bash-3.2$ LOG: =A0could not open configuration file
> "/usr/local/pgsql/data/pg_hba.conf": Permission denied
> FATAL: =A0could not load pg_hba.conf
> -------------
>
> The problem appears after changing permissions for /data folder in finder=
.. I
> did this:
>
> I=92m installing postgresql 8.4 from MacOS binary and it installs and sta=
rts
> ok. Then I try to edit pg_hba.conf in pgAdmin3 to add a line
> --------------
> host =A0 =A0all =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 10.0.0.6 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0md5
> --------------
> After I click save icon to save a file it doesn=92t save =96 probably it =
doesn=92t
> have enough permission for that. So I go to my /usr/local/pgsql/data/ fol=
der
> in Finder =96 unlock it=92s permissions and set read/write to everyone gr=
oup.
> Then I edit the pg_hba file with TextEdit.app and it looks like this
>
> -------------
> # "local" is for Unix domain socket connections only
> local =A0 all =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 trust
> # IPv4 local connections:
> host =A0 =A0all =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 127.0.0.1/32 =A0 =A0 =
=A0 =A0 =A0trust
> host =A0 =A0all =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 10.0.0.6 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0md5
> # IPv6 local connections:
> host =A0 =A0all =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 ::1/128 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 trust
> -------------
>
> Then server doesn=92t start =96 start server.app exits with non-zero valu=
e.
> Command line returns
> -------------
> BigMac:~ postgres$ FATAL: =A0data directory "/usr/local/pgsql/data" has g=
roup
> or world access
> DETAIL: =A0Permissions should be u=3Drwx (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: =A0could not open configuration file
> "/usr/local/pgsql/data/pg_hba.conf": Permission denied
> FATAL: =A0could not load pg_hba.conf
> -------------
>
> I=92ve tried installing postgre from source thru fink, and the problem st=
ays
> the same. I=92m really stuck here, and I really need postgre to be access=
ed
> from 10.0.0.6 machine.
> What am I doing wrong? As I understand it=92s a folder access permission
> problem, but I don=92t know how to fix it. Can anyone PLEASE help me?
>
> --
> View this message in context: http://www.nabble.com/Problem-starting-pgsq=
l-server-on-Mac-OS-X.-Pg_hba.conf-reading-permission.-tp2522 0784p25220784.h=
tml
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
add postgres user in osx ;]
Solution:
http://www.postgresql.org/docs/8.3/interactive/postgres-user .html
;]
--
Pawel Socha
--
Sent via pgsql-admin mailing list (pgsql-admin [at] postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin