launchd Permission Denials

I have Lingon set to run an Automator Workflow under certain conditions but whenever it tries to run, it gives the console error:

4/1/08 1:47:22 AM com.apple.launchd[70] (com.Tai.Sociology Converter[1918]) posix_spawnp("/Users/tai/Desktop/SociologyConverter.app", ...): Permission denied

I've set all the permissions I can think of to read and write but to no avail, any ideas from anyone with more knowledge than I?

Mac OS X (10.5.2), MacBook

Posted on Mar 31, 2008 11:59 PM

Reply
5 replies

Jun 8, 2008 9:52 AM in response to GuardianXF

Hi I've had this problem,

The way round it is to write an applescript like this:

on run
tell application "You WorkFlow Application Here"
launch
end tell
end run

save it as a run only application

then launch the applescript app from Lingon instead.


It's something to do with the fact that workflows need automator to be launched to work. I think !


Hope it works for you


Nic

Apr 21, 2009 1:59 AM in response to GuardianXF

I had the same error message.

There were 2 problems.

1. After saving the Automator workflow as an app I then (mistakenly) renamed it in Finder. This causes a problem as the actual executable file is held in the .app package and uses the name that you saved the Automator workflow as the name of the executable. You can see the executable being referenced after the name of the app in the plist file below "Sync iPhone.app/Contents/MacOS/SynciPhone"

2. Lingon did not seem to be creating a plist file that would run. So I used Lingon to get the format roughly correct, then went into expert mode to edit the file as below.

Sync_iPhone.app is a very simple automator file that issues a sync request in itunes to sync any connected iPhone or iPod.

It is set to run at 5:30 am every day.

com.andrewharrison.SynciTunes.plist file below

<?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>Label</key>
<string>com.andrewharrison.SynciTunes</string>
<key>Program</key>
<string>/Users/andrew/Documents/Automator/Sync iPhone.app/Contents/MacOS/SynciPhone</string>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>5</integer>
<key>Minute</key>
<integer>30</integer>
</dict>
</dict>
</plist>

Apr 9, 2010 6:40 AM in response to GuardianXF

Hello!

I know this is an old topic, but I've been struggling too to set up a launchd plist for an Automator Workflow app. First I got it to work by creating a seperate AppleScript app that launches my Workflow app (as suggested by Nic Chant). But now I finally got it working without any extra steps or applications. This is what I've learned:

1) You can't refer to the .app file, you need to use a path that leads into the .app file to a file within the MacOS folder;
2) If the path contains spaces, don't worry, do not put a \ in front of them;
3) If your Workflow app launches other processes add this to your plist file to prevent your running app process from being killed before it can finish:

<key>AbandonProcessGroup</key>
<true/>

More info on this: http://forums.macosxhints.com/showthread.php?t=94302

Here's an example of a plist that finally worked for me:

<?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>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>com.sander.screenshot</string>
<key>ProgramArguments</key>
<array>
<string>/Users/sander/Documents/screenshot.app/Contents/MacOS/Application Stub</string>
</array>
<key>StartInterval</key>
<integer>600</integer>
</dict>
</plist>

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.

launchd Permission Denials

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