At 1:07 -0800 16/1/03, Rich Morin wrote:

I then noticed that the script (and any daemons it might start up) was
running as root.  Ungood.  I worked around the problem by setting the
script "setuid nobody", but this is not a really robust solution.  I
also filed a bug, suggesting that Apple add a startup parameter (e.g.,
RunAs) that would set the username; the default should be nobody.
In your script, execute the real command using su, eg:

su peter -c '/usr/bin/perl /Users/peter/perl/check-services.pl' &

P.S.  Is there any other documentation to recommend on Startup scripts?
I'd like to hear this one too - I've found that my Startup scripts are very unreliable (ie, they seem often to either not execute, or execute at the wrong time such that they fail - basically the daemon does not end up running after a reboot). Some detailed info on the StartupParameters.plist might be helpful.

Enjoy,
Peter.

--
<http://www.interarchy.com/> <http://download.interarchy.com/>

Reply via email to