[SOLVED] How to exec as a specific user?
How do I designate the user under which to exec in the run file?
Execute as [user]?
How do I even ask the question?
I looked in the run files of nginx and php-fpm, but these programs apparently su on their own.
For example:
# cat ../nginx/run
#!/bin/sh
exec nginx -g 'daemon off;'
This ends up running under the http user, because nginx seems somehow able to designate the user which executes it after it has already been executed... That's a magic causality paradox and I don't know how...
I need to do a thing when boot:
# cat ../mything/run
#!/bin/sh
exec /bin/mything --myoptions
...but this ends up running as root. I don't want that. Double-plus ungood. Muh not secures.
I created an isolation user specifically for this service, but I can't find a single word in any of the runit docs about how to make it do.
Systemd(odo) had a specific field for designating the user... I don't know what to do.