[SOLVE] Problem with minidlna after update to 1.1.5-1

This forum is for discussion about general software issues.

[SOLVE] Problem with minidlna after update to 1.1.5-1

Postby mcloaked » Mon Sep 21, 2015 8:34 pm

I had minidlna working just fine - but today after updating to minidlna 1.1.5-1 I can't access my media files now where they were fine before.

There is a note in the pacman log to:
$this->bbcode_second_pass_code('', '
[2015-09-21 20:14] [ALPM-SCRIPTLET] -- minidlna uses minidlna/minidlna user/group now,
[2015-09-21 20:14] [ALPM-SCRIPTLET] -- needs manual intervention in /var/cache/minidlna and /run/minidlna!
')

$this->bbcode_second_pass_code('', '
# ls -l /var/cache/minidlna/
total 76
-rw-r--r-- 1 minidlna minidlna 77824 Sep 21 21:21 files.db
')

and
$this->bbcode_second_pass_code('', '
# ls -l /run/minidlna
total 4
-rw-r--r-- 1 minidlna minidlna 4 Sep 21 21:21 minidlna.pid
')

The media files are in my user home area - and I was running as user mike, but switched back to user minidlna - and the systemd unit fails to start giving:

$this->bbcode_second_pass_code('', '
Sep 21 21:21:14 cubox1 systemd[1]: Started minidlna server.
Sep 21 21:21:14 cubox1 minidlnad[800]: [2015/09/21 21:21:14] minidlna.c:614: error: Media directory "A,/home/mike/Music/" not accessible [Permission denied]
Sep 21 21:21:14 cubox1 minidlnad[800]: [2015/09/21 21:21:14] minidlna.c:614: error: Media directory "P,/home/mike/Pictures/" not accessible [Permission denied]
Sep 21 21:21:14 cubox1 minidlnad[800]: [2015/09/21 21:21:14] minidlna.c:614: error: Media directory "V,/home/mike/Videos/" not accessible [Permission denied]
Sep 21 21:21:14 cubox1 minidlnad[800]: minidlna.c:1030: warn: Starting MiniDLNA version 1.1.5.
Sep 21 21:21:14 cubox1 minidlnad[800]: minidlna.c:1070: warn: HTTP listening on port 8200
')

I also changed the systemd unit file as per:
$this->bbcode_second_pass_code('', '
# cat /etc/systemd/system/minidlna.service
[Unit]
Description=minidlna server
After=network.target

[Service]
Type=simple
User=minidlna
Group=minidlna
ExecStart=/usr/bin/minidlnad -S
ProtectSystem=full
ProtectHome=read-only
PrivateDevices=on
NoNewPrivileges=on

[Install]
WantedBy=multi-user.target
')

so that ProtectHome is set to read-only

Can anyone suggest what I am doing wrong now after this newest update?
Last edited by mcloaked on Mon Sep 21, 2015 9:34 pm, edited 1 time in total.
mcloaked
 
Posts: 97
Joined: Thu Oct 16, 2014 4:16 pm

Re: Problem with minidlna after update to minidlna 1.1.5-1

Postby mcloaked » Mon Sep 21, 2015 9:33 pm

After spending much of this evening on this issue I finally resolved the problems by converting the user to mike instead of minidlna. The steps were:

1) chown mike:mike /var/run/minidlna

2) chown mike:mike /var/cache/minidlna

3) rm /var/cache/minidlna/minidlna.log

4) Edit the systemd unit file for minidlna (it was copied from the system copy into /etc/systemd/system/minidlna.service) to include:

[Service]
Type=simple
User=mike
Group=mike

With the rest of the file default and including ProtectHome=read-only

5) In /etc/minidlna.conf

user=mike

Now when restarting minidlna via systemctl it starts up fine with the status being:

$this->bbcode_second_pass_code('', '
# systemctl -l status minidlna
* minidlna.service - minidlna server
Loaded: loaded (/etc/systemd/system/minidlna.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2015-09-21 22:21:39 BST; 11min ago
Main PID: 417 (minidlnad)
CGroup: /system.slice/minidlna.service
`-417 /usr/bin/minidlnad -S

Sep 21 22:21:39 cubox1 systemd[1]: Started minidlna server.
Sep 21 22:21:39 cubox1 minidlnad[417]: minidlna.c:1030: warn: Starting MiniDLNA version 1.1.5.
Sep 21 22:21:39 cubox1 minidlnad[417]: minidlna.c:355: warn: Creating new database at /var/cache/minidlna/files.db
Sep 21 22:21:39 cubox1 minidlnad[417]: minidlna.c:1070: warn: HTTP listening on port 8200
Sep 21 22:23:52 cubox1 minidlnad[417]: playlist.c:125: warn: Parsing playlists...
Sep 21 22:23:52 cubox1 minidlnad[417]: playlist.c:259: warn: Finished parsing playlists.
')

Hopefully this might help anyone else with the same problem.
mcloaked
 
Posts: 97
Joined: Thu Oct 16, 2014 4:16 pm


Return to General

Who is online

Users browsing this forum: Google [Bot] and 8 guests