I recently installed PostgreSQL and am now getting these errors when I start up:

“/Library/StartupItems/HWPortDetect” has not been started because it does not have the proper security settings.

“/Library/StartupItems/PostgreSQL” has not been started because it does not have the proper security settings.

Any idea on why this is happening and how I can fix it?

link|improve this question
feedback

2 Answers

Try running the following commands :

sudo chown -R root:wheel /Library/StartupItems

sudo chmod -R 755 /Library/StartupItems

These commands will set the right user, group and executing/writing/reading permissions to the folder StartupItems subfolders.

link|improve this answer
That stopped the error but now I can't get PostgreSQL to start! – gshankar Feb 18 '10 at 1:43
What's printed in the log ? – Studer Feb 18 '10 at 1:57
Where can I look that up? I should add that I re-installed PostgreSQL to check that it wasn't something I did during installation. Now the warning is back, however, PostgreSQL seems to autostart ok... – gshankar Feb 18 '10 at 2:07
Console.app > All messages – Studer Feb 18 '10 at 2:11
feedback
up vote 0 down vote accepted

I think I managed to solve the problem.

1- I deleted the /Library/StartupItems/PostgreSQL folder which was causing my problems (I don't think the startup item was working properly anyway)

2- With the help of this blogpost: http://www.ketema.net/serendipity/archives/89-Autostarting-PostgreSQL-on-Leopard.html

I rolled my own autostart plist file

Now PostgreSQL autostarts fine and I don't get the security warning. FYI my org.postgresql.plist file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>EnvironmentVariables</key>
    <dict>
        <key>PGDATA</key>
        <string>/Library/PostgreSQL8/data</string>
    </dict>
    <key>GroupName</key>
    <string>wheel</string>
    <key>Label</key>
    <string>postgresql</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Library/PostgreSQL8/bin/postgres</string>
        <string>-i</string>
    </array>
    <key>RunAtload</key>
    <true/>
    <key>ServiceDescription</key>
    <string>PostgreSQL Server</string>
    <key>StandardErrorPath</key>
    <string>/Library/PostgreSQL8/data/pg_log/logfile</string>
    <key>StandardOutPath</key>
    <string>/Library/PostgreSQL8/data/pg_log/logfile</string>
    <key>UserName</key>
    <string>postgres</string>
        </dict>
</plist>
link|improve this answer
FYI I put the plist file in /Library/LaunchDaemons/ and it's called org.postgresql.plist – gshankar Jul 21 '10 at 0:21
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.