2

minidlna will not access my pictures since adding a picture folder. Folder permissions for my pictures folder: drwxr-xr-x
minidlna status returns-

minidlna.c:674: error: Media directory "PV,/home/name/Pictures" not accessible [Permission denied]

It worked fine previously. How do I set the permissions for my media please? I have tried set user=root for /etc/default/minidlna and /etc/minidlna.conf followed by reload and restart, but still the same error code. Changed permissions to drwxrwxr-x but still not working. I am using Lubuntu 24.04 LTS.

kos
  • 41,268
Marty
  • 645

2 Answers2

1

sudo usermod -aG "$(id -gn)" minidlna This worked for me, thank you KOS

Marty
  • 645
0

Turns out, minidlna runs as the minidlna user which, per your home directory permissions (750), wasn't able to access anything in your home directory.

A reasonable approach to share personal media over DLNA in my opinion would be:

  1. Creating a directory for DLNA-shared media in /srv:

    sudo mkdir -p /srv/dlna/shared
    sudo chown minidlna: !$
    sudo chmod 700 !$
    
  2. Adding symlinks to directories to be shared in /srv/dlna/shared:

    sudo ln -s ~/Pictures /srv/dlna/shared/Pictures
    
  3. Making directories to be shared co-owned by minidlna:

    chgrp -R minidlna ~/Pictures
    find ~/Pictures -type d -exec chmod 2750 {} +
    find ~/Pictures -type f -exec chmod 640 {} +
    

Then adding /srv/dlna/shared/Pictures to /etc/minidlna.conf and making sure minidlna is configured to follow symlinks (wide_links=yes must be set in /etc/minidlna.conf).

This way, you won't need to add minidlna to your primary group, but all present (and future) files in ~/Pictures will be accessible by minidlna.

kos
  • 41,268