leedm777 / homebrew-asterisk

Homebrew tap for building an Asterisk dev environment
50 stars 27 forks source link

Cannot load launched config #3

Closed sja closed 9 years ago

sja commented 10 years ago

On OS X 10.9.3, I got this error:

macrouter:~ sja$ ls -lah /Library/LaunchDaemons/
total 16
drwxr-xr-x   4 root      wheel      136B  8 Jun 13:15 .
drwxr-xr-x+ 64 root      wheel      2,1K  8 Jun 10:57 ..
-rw-r--r--   1 root      wheel      472B  8 Jun 09:09 com.apple.serverd.plist
-rw-r--r--   1 asterisk  asterisk   750B  8 Jun 13:15 org.asterisk.asterisk.plist
macrouter:~ sja$ ls -lah /Library/LaunchDaemons/org.asterisk.asterisk.plist 
-rw-r--r--  1 asterisk  asterisk   750B  8 Jun 13:15 /Library/LaunchDaemons/org.asterisk.asterisk.plist
macrouter:~ sja$ sudo launchctl
launchd% load /Library/LaunchDaemons
launchctl: Dubious ownership on file (skipping): /Library/LaunchDaemons/org.asterisk.asterisk.plist
com.apple.serverd: Already loaded
launchd% 

Has somebody any idea about this?

morgant commented 10 years ago

I know this is issue is months old at this point, but since I know the answer I might as well reply.

launchd .plist files need to be owned by root:wheel and have permissions of 644, which is why it complained about "Dubious ownership on file". You can fix as follows:

chmod 644 /Library/LaunchDaemons/org.asterisk.asterisk.plist
chown root:wheel /Library/LaunchDaemons/org.asterisk.asterisk.plist

Also note that it's best to load/unload an individual .plist at a time as follows:

sudo launchctl load /Library/LaunchDaemons/org.asterisk.asterisk.plist
leedm777 commented 9 years ago

@sja So, 1.5 years later...

I've changed the plist and installation instructions to be more homebrew-like. If you want to give it another go with the new instructions, please do.