Can launchd be made to set a different owner on files it creates while executing a .plist job? I have a launchctl .plist file in /Library/LaunchDaemons as follows:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;david.ports.slocate.home.updatedb&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/opt/local/bin/slocate&lt;/string&gt;
        &lt;string&gt;-U&lt;/string&gt;
        &lt;string&gt;/Users/david&lt;/string&gt;
        &lt;string&gt;-o&lt;/string&gt;
        &lt;string&gt;/Users/david/slocate_david.db&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;Umask&lt;/key&gt;
    &lt;string&gt;077&lt;/string&gt;
    &lt;key&gt;StartCalendarInterval&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Hour&lt;/key&gt;
        &lt;integer&gt;5&lt;/integer&gt;
        &lt;key&gt;Minute&lt;/key&gt;
        &lt;integer&gt;45&lt;/integer&gt;
    &lt;/dict&gt;
&lt;/dict&gt;
&lt;/plist&gt;


For those who are wondering, I use the slocate port from MacPorts instead of the native locate database that ships with OS X.  This .plist job updates the slocate database specific to my home directory at 5:45 AM daily.  The Umask setting of 077 makes the output file readable only by me.  However, the file is created with the ownership of root; not what I want.

Is there a way to specify the ownership of the output file instead of the default of root?  I realize I can run this as a LaunchAgent under ~/Library/LaunchAgents, but I prefer the job to run whether I am logged in or not, hence installing it as a LaunchDaemon.

I'm running OS X 10.10.3 Yosemite.
I have a few suggestions. According to to the manual, you can set the UserName key- https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html. You could use periodic with a shell script to run slocate and change the permissions of the database. Setup a user crontab. A user crontab will only run at the specified time.