0

This was installed from a deb on ubuntu 19.04 and worked fine but was running as root which I wanted to change. Here is the unit file

systemctl cat edvrserver.service 
# /run/systemd/generator.late/edvrserver.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/edvrserver
Description=LSB: exacqVision Server
After=remote-fs.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/edvrserver start
ExecStop=/etc/init.d/edvrserver stop

The only thing in the script related to a user or group was the following

XDV_USER=exacq
XDV_GROUP=exacq
XDV_PERMS=644

both user and group where changed from root to exacq, exacq being a valid user and group on the system. But if I run

sudo systemctl start edvrserver

and than

ps aux | grep edvr

it shows me that it is running as root, do I need to change this anywhere else?

sealfab
  • 173
  • Take a look here: https://askubuntu.com/questions/676007/how-do-i-make-my-systemd-service-run-via-specific-user-and-start-on-boot#676022 – ajgringo619 Dec 29 '19 at 03:07
  • ajgringo619 should read https://unix.stackexchange.com/a/233581/5132 . (-: – JdeBP Dec 29 '19 at 04:03

0 Answers0