Making Mac OSX launchctl launch a process as root on startup

前端 未结 1 442
悲&欢浪女
悲&欢浪女 2021-02-04 13:32

My question is how to make a MacOSX daemon process using launchd start with root privileges automatically after a reboot?

I\'m writing an application for in house use th

相关标签:
1条回答
  • 2021-02-04 14:21

    You've put this in the wrong directory. LaunchAgents are processes run per-user. System processes go in /Library/LaunchDaemons. They are run as root. If you want this to run at startup, I recommend making that explicit with:

    <key>RunAtLoad</key>
    <true/>
    
    0 讨论(0)
提交回复
热议问题