Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Make minidlna run as another other than root. Requires some simple modifications to the init.d script and default location of PID file
PID file modification:
Default PID location since /var/run isn't writable by world / unprivileged user:
init.d script modification
change the default pid location:
ARGS="-f $CONF -P $PIDFILE"
Change start-stop-daemon to start daemon as unprivileged user:
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.