Hi Javier,

grep -ril startupitem.executable /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/ | xargs less


suggests that sudo -u is the way to do it if a program doesn't know how to drop privileges. If that doesn't work, I guess several ports have the same problem that you describe with su. sudo does fork a process per the man page, so they may do.

Russell

(sent to macports-dev)

On 17/09/16 16:12, Javier Alcázar wrote:
Hi people,

I'm creating a new Portfile with startupitem.executable, and wondering what is the best way to execute the command with a specific user.

I tried using "su -c executable args" but with this approach launchd ends up monitoring the "su" process instead of the "executable"

What would you recommend to do so launchd looks at the "executable" process?





Cheers


--
Javier


_______________________________________________
macports-users mailing list
macports-us...@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to