PostgreSQL Permission denied Error on Unix domain socket “/var/pgsql_socket/.s.PGSQL.5432” - Lion Server 10.7.3 or Lion Server 10.7.4

前端 未结 2 1745
孤城傲影
孤城傲影 2020-12-12 02:36

I recently had major permission problems using Lion Server where permissions would change on folders at will. During this time I had started getting the following error whe

相关标签:
2条回答
  • 2020-12-12 03:19

    which psql will most likely show /bin/psql I'm guessing we want to call /usr/local/bin/psql

    So either we change the $PATH to include /local/bin prior to /bin, which I don't think is a very good solution (security and such), or We remove /usr/bin/psql by either rm-ing (or mv-ing) the file, (and symlinking to /usr/local/bin) or uninstalling the psql client.

    0 讨论(0)
  • 2020-12-12 03:25

    After continuing to search for blog posts we were able to find one that dealt with Lion 10.7.4. What I did not know that something had changed between 10.7.2 when I started writing my Rails application and now with PostgreSQL. We found the following blog post which helped me solve the problem I had for several days.

    http://www.mactasia.co.uk/revisited-using-postgresql-in-lion-server

    I ended up logging in as root and doing the following:

    Made the following changes in /System/Library/LaunchDaemons/org.postgresql.postgres.plist

    listen_addresses=127.0.0.1
    unix_socket_permissions=0777
    

    Changed the permissions of /var/psql_socket

    sudo chmod 755 /private/var/pgsql_socket
    

    Afterwards I logged out of root and logged in as I normally do as a server admin. I no longer got the permission error.

    0 讨论(0)
提交回复
热议问题