You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run a Nextbox, which basically is a Nextcloud instance running in Docker on a Raspberry Pi. Nextcloud does not (yet?) support serving media via DLNA and the workaround is to just use MiniDLNA. Since maintenance of this Nextbox is done by Nitrokey, I do not want to mess with the host system too much, and rather run MiniDLNA also within Docker, so this is how I got here.
The media files in the Nextcloud data directory are in a Docker volume, which is no problem to mount also in the MiniDLNA container. But they are of course owned by www-data:www-data, so they can not be accessed by MiniDLNA:
[2021/11/13 16:25:30] minidlna.c:670: error: Media directory "/nextcloud/data/me/files" not accessible [Permission denied]
I tried to solve this by adding the environment variable MINIDLNA_USER=33 (UID of www-data) to this container, but this UID is assigned to another user xfs in this Alpine-based MiniDLNA container and so this gave me even more errors and resulted in the container exiting:
[2021/11/13 16:27:43] minidlna.c:670: error: Media directory "/nextcloud/data/me/files" not accessible [Permission denied]
minidlna.c:496: warn: Unable to change pidfile /minidlna/minidlna.pid ownership: Operation not permitted
minidlna.c:1065: error: Unable to set db_path [/minidlna/cache] ownership to 33: Operation not permitted
minidlna.c:1074: fatal: Failed to switch to uid '33'. [Operation not permitted] EXITING.
So I wonder whether changing the UID of the user running MiniDLNA in the container is actually the right approach. Do you have any suggestions how to gain access to the files, without changing the permissions on the host, because that will mess up the Nextcloud installation.
This is very interesting. I am not sure how to resolve this, but can you try a few things?
First, it's not MINIDLNA_USER that you need to change but, PUID=33 and PGID=33, like this:
I run a Nextbox, which basically is a Nextcloud instance running in Docker on a Raspberry Pi. Nextcloud does not (yet?) support serving media via DLNA and the workaround is to just use MiniDLNA. Since maintenance of this Nextbox is done by Nitrokey, I do not want to mess with the host system too much, and rather run MiniDLNA also within Docker, so this is how I got here.
The media files in the Nextcloud data directory are in a Docker volume, which is no problem to mount also in the MiniDLNA container. But they are of course owned by
www-data:www-data
, so they can not be accessed by MiniDLNA:I tried to solve this by adding the environment variable
MINIDLNA_USER=33
(UID ofwww-data
) to this container, but this UID is assigned to another userxfs
in this Alpine-based MiniDLNA container and so this gave me even more errors and resulted in the container exiting:So I wonder whether changing the UID of the user running MiniDLNA in the container is actually the right approach. Do you have any suggestions how to gain access to the files, without changing the permissions on the host, because that will mess up the Nextcloud installation.
Here is the Docker Compose snippet I use
The text was updated successfully, but these errors were encountered: