You are not logged in.
Though minidlna works on User:minidlna,minidlna changes his pid folder ownership to nobody:nobody every boot.
So, I have to change pid foider ownership every boot.
Why this strange things happen?
Is there the way of dealing with it?
*minidlna.service
[Unit]
Description=minidlna server
After=network.target
[Service]
Type=forking
User=minidlna
ExecStart=/usr/sbin/minidlna -P /var/run/minidlna/minidlna.pid
PIDFile=/var/run/minidlna/minidlna.pid
[Install]
WantedBy=multi-user.target*minidlna.conf is not modified exclude 'media_dir' section.
*Enviroment
Kernel Version: 3.6.2-1-ARCH
systemd Version: systemd 194 archLast edited by acounto (2012-10-18 11:34:43)
Offline
I had a similar issue with this that I recently resolved, so you're in luck.
First, check /lib/tmpfiles.d/minidlna.conf
Make sure the user and group in there are set to "minidlna" since that's what you have in your minidlna.service file. This was the part I hadn't known about, but it's documented in the systemd manpages.
After you've changed that, make sure to execute:
sudo chown minidlna:minidlna /var/{run,log,cache}/minidlna/ -R
This will force all relevant minidlna daemon folders to switch to user:group minidlna:minidlna.
Finally, you may want to just remove /var/run/minidlna/minidlna.pid and /var/cache/minidlna/files.db if they exist. This will allow systemd to load the minidlna.pid when you restart minidlna if the permissions are still broken somehow, and will force minidlna to rebuild your file database next time it loads.
After you've done all that, enable minidlna.service again using:
sudo systemctl enable minidlna.service
Finally, try starting the service by executing:
sudo systemctl start minidlna.service
Check if it worked by running:
sudo systemctl status minidlna.service
This should solve your problem. Good luck!
Last edited by albeec13 (2012-10-18 01:40:34)
Offline
I've modify /lib/tmpfiles.d/minidlna.conf and now it's ok!
Thank you ,albeec13!
Offline