Score:0

Minidlna fails to read external directory

th flag

I have an exfat formatted drive attached to my raspberry pi and I want to add a folder from that disk to minidlna but I cannot. It works fine with the internal shared folder.

This is service status output:

systemctl status minidlna

* minidlna.service - MiniDLNA lightweight DLNA/UPnP-AV server
   Loaded: loaded (/lib/systemd/system/minidlna.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2021-07-26 16:06:49 EDT; 6s ago
     Docs: man:minidlnad(1)
           man:minidlna.conf(5)
  Process: 687 ExecStart=/usr/sbin/minidlnad -f $CONFIGFILE -P /run/minidlna/minidlna.pid $DAEMON_OPTS (code=exited, status=0/SUCCESS)
 Main PID: 688 (code=exited, status=255/EXCEPTION)

Jul 26 16:06:49 raspberrypi systemd[1]: Starting MiniDLNA lightweight DLNA/UPnP-AV server...
Jul 26 16:06:49 raspberrypi minidlnad[687]: [2021/07/26 16:06:49] minidlna.c:631: error: Media directory "/media/pi/SSD/shared" not accessible [Permission Denied]
Jul 26 16:06:49 raspberrypi systemd[1]: minidlna.service: Failed to parse PID from file /run/minidlna/minidlna.pid: Invalid argument
Jul 26 16:06:49 raspberrypi systemd[1]: Started MiniDLNA lightweight DLNA/UPnP-AV server.
Jul 26 16:06:49 raspberrypi systemd[1]: minidlna.service: Main process exited, code=exited, status=255/EXCEPTION
Jul 26 16:06:49 raspberrypi systemd[1]: minidlna.service: Failed with result 'exit-code'.

This is how the drive mounted:

/dev/sda2 on /media/pi/SSD type exfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uhelper=udisks2)

It says it's mounted read-only but I can modify anything on it.

And here is the output for ls -l /media/pi:

ls -l /media/pi
total 128
drwxr-xr-x 6 pi pi 131072 Jul 26 15:54 SSD

In /etc/minidlna.conf I set user=pi.

Score:0
br flag

To see if this is indeed a problem with access rights I have changed the ownership of all files on the mounted drive to root.root and set 777 as access mask. Also I have allowed access to the minidlna group in the ACL (Shared Folders). So it is definitely an ownership or access rights issue in my case. I have not yet got to the exact part that causes problem but believe it may lay in the way the permissions are set on the mount point.

Maysam avatar
th flag
I'll try that, thanks
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.