I always prefer to run a service in its own account, unless it
*requires* root.
I created a user 'scholarworks' (since our repository is named
"ScholarWorks") and configured the PM2 startup script to run PM2 as
that user. Details will depend on your OS -- here we use Gentoo
Linux, which uses OpenRC for startup, so I have a configuration script
for this in '/etc/conf.d/'.
One minor unpleasant result is that, if I want to interact with that
PM2 instance, I have to 'su' to its account. Not a big deal, just an
annoyance that I have to remember.
--
Mark H. Wood
Lead Technology Analyst
University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu