I installed the latest driver (
May 10, 2014) on ubuntu 14.04 and ran
ps aux | grep mediasrv. I found that the
mediasrv driver process is running as user root, and I was wondering if this was really necessary.
So, I started looking around my system where this process is started. I found two possible places:
- /etc/udev/rules.d/80-mediasrv-eeti.rules
Inside this file, it sais:
SUBSYSTEM=="usb", ACTION=="add", RUN+="/opt/bin/mediaclient --start=5 --systemdcheck"
Which made me check the systemd directory. - /etc/systemd/system/multi-user.target.wants/sundtek.service which is a soft link to /usr/lib/systemd/system/sundtek.service
First of all, this link target does not exist, so the installer must be broken/buggy for my system.
What does exist, is the file /lib/systemd/system/sundtek.service (no /usr/ at the beginning)
The contents of this file are (in part) ExecStart=/opt/bin/mediaclient --start=4 and ExecStop=/opt/bin/mediaclient --shutdown
I'm not entirely sure on this, but the way I think this works is the following:
mediasrv is
not started during boot by the
/lib/systemd/system/sundtek.service file, because the soft link
/etc/systemd/system/multi-user.target.wants/sundtek.service points to the wrong file.
That leaves
udev to start the service when hotplugging.
Is this correct?Coming back to my initial curiosity: "Does
mediasrv have to run as root?", I think not (
right?), but I'm reluctant to edit the
/etc/udev/rules.d/80-mediasrv-eeti.rules file, if the service is
supposed to be started by
systemd. In case of the latter, can I just fix the symlink to the
systemd script and change
that to run
mediasrv (via
mediaclient) as a different user?