In my setup the original 1.1.1 release works fine.
in /etc/minidlna.conf I set user=nobody
I do not use the init.d/start-stop-daemon script (I built a simple rc.minidlnad for slackware), but as far as I see, all is working as designed.
I'm not sure what version you are using, but in minidlnad 1.1.1 the pid file is located at /var/run/minidlna/minidlna.pid . By simply setting the username in the conf file, minidlnad runs as that user after setting up the required files as root.
Although your option may have worked in the past, LAUNCHING MINIDLNAD as any user other than root doesn't seem to be the best approach. The program needs to create files/directories and sockets as root, then it DROPS ITSELF to the appropriate user.
I would consider this request closed- you can run as another user, and the pid file is generated/deleted correctly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
PID file modification:
Default PID location since /var/run isn't writable by world / unprivileged user:
change from:
/var/run/minidlna.pid
to:
/var/run/minidlna/minidlna.d
init.d script modification
change the default pid location:
PIDFILE=/var/run/minidlna/minidlna.pid
ARGS="-f $CONF -P $PIDFILE"
Change start-stop-daemon to start daemon as unprivileged user:
USER=nobody
start-stop-daemon -c $USER --start --quiet --pidfile $PIDFILE --startas $MINIDLNA -- $ARGS $LSBNAMES
In my setup the original 1.1.1 release works fine.
in /etc/minidlna.conf I set user=nobody
I do not use the init.d/start-stop-daemon script (I built a simple rc.minidlnad for slackware), but as far as I see, all is working as designed.
I'm not sure what version you are using, but in minidlnad 1.1.1 the pid file is located at /var/run/minidlna/minidlna.pid . By simply setting the username in the conf file, minidlnad runs as that user after setting up the required files as root.
Although your option may have worked in the past, LAUNCHING MINIDLNAD as any user other than root doesn't seem to be the best approach. The program needs to create files/directories and sockets as root, then it DROPS ITSELF to the appropriate user.
I would consider this request closed- you can run as another user, and the pid file is generated/deleted correctly.