[launchd-dev] Appropriate LaunchDaemon filesystem locations

Quinn "The Eskimo!" eskimo1 at apple.com
Tue Mar 1 02:00:05 PST 2011


On 25 Feb 2011, at 17:26, Jeremy Reichman wrote:

> What standard locations are considered appropriate for launchdaemons?

There's a tricky trade-off between correctness and user visibility here.  Probably the most correct option is to put your daemon in a sub-directory of /usr/local.  The problem with that location is that it's not visible to the user (in the Finder), something many folks, including myself, object to.  Recently we've started putting stuff in /Library/PrivilegedHelperTools, but the focus of that directory is in the name; it's about helper tools for privilege separation, and is probably not the best choice for general daemons.

*shrug*

On 25 Feb 2011, at 17:26, Jeremy Reichman wrote:

> As long as I'm asking, is there any functional or security difference between a launchdaemon plist with 755 or 644 permissions. I almost exclusively see them with 644 permissions (and root:wheel ownership) but occasionally come across one that is 755.

644 is correct.  755 is a mistake, but a relatively benign one.

On 25 Feb 2011, at 18:29, Thomas Clément wrote:

> Appropriate locations are listed in the man page for launchd.

<x-man-page://8/launchd> only covers places where you should put launchd property list files, not the code itself.  A better man page is <x-man-page://7/hier>.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware




More information about the launchd-dev mailing list