Running services from different users

(Jed Hassell) #1

I am installing a formula which installs a plist to be used with brew services. My user is a user with admin rights. I would like to be able to start this service from a user without admin rights. Currently, when I run brew services start formula, I get this error:

/bin/launchctl enable gui/503/homebrew.mxcl.formula
Usage: launchctl enable <service-target>
Error: Failure while executing: /bin/launchctl enable gui/503/homebrew.mxcl.formula

If I use sudo it works but the intent is to be able to use it on a user without sudo rights.