mail.app hang due to postgresql permissions?

I did a time machine restore, and all is fine except I can't use mail.app. The app hangs before the GUI loads. The console is reporting this (over and over again):


org.postgresql.postgres: 2011-07-21 08:40:56 EDT FATAL: could not create log file "/Library/Logs/PostgreSQL.log": Permission denied

com.apple.launchd: (org.postgresql.postgres[912]) Exited with code: 1


So it seems mail.app can't use its database, due to a change in user-group permissions? How can I repair this without resorting to a clean reinstall of Lion?

Posted on Jul 21, 2011 5:47 AM

Reply
5 replies

Aug 4, 2011 6:01 AM in response to Alan Schauer

This may not work for you, but it did for me as I was having similar problems. It seems that these errors are ultimately caused by Postgres not being able to start due to a permissioning error in the /Library/Logs dir when it tries to open the PostgreSQL.log file.


I corrected it by issuing the following commands in Terminal


sudo touch /Library/Logs/PostgreSQL.log

sudo chown _postgres:admin /Library/Logs/PostgreSQL.log


This will create the log file and give it the proper ownership for Postgres to have its way with it. After that, launchd should be able to start up Postgres without any problems.

Jan 22, 2012 5:13 AM in response to Alan Schauer

Hi,


I tried to bind my OD Lion server with the Directory Utility to OD itself so to the local database. Bad idea and the only way getting server up and running again was to restore TIme Machine Backup.


After the restore Profile Manager did not work anymore (Error reading config). With the two lines mentioned here in the threat I was able to fix this problem:


sudo touch /Library/Logs/PostgreSQL.log

sudo chown _postgres:admin /Library/Logs/PostgreSQL.log


I don't know what I would have done without that. I have to say I'm using Mac only for a few months now but problems with Windows machines are really nothing compared with what Mac OS is causing. It's a real disapointment for such an amount of money. Maybe Windows does not look that nice and fancy but behind the scenses there is at least good engeneering. Sorry for that lines. They don't belong here I'm just quite upset about this OS. Time Machine has saved me now two times from a absolute disaster by executing operating system tasks.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

mail.app hang due to postgresql permissions?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.