Minidlna not accessible [Permission denied]

Bonjour,

J’ai acheter le rpi5 8 Go, j’ai installer le système sur la carte sd Raspberry Pi os Full x64 (2.7 Go) Publié le 05-12-2023, tout fonctionne sauf minidlna.

serveur@RPI-5:~ $ sudo systemctl status minidlna
● minidlna.service - MiniDLNA lightweight DLNA/UPnP-AV server
     Loaded: loaded (/lib/systemd/system/minidlna.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-01-30 00:23:41 CET; 19h ago
       Docs: man:minidlnad(1)
             man:minidlna.conf(5)
   Main PID: 779 (minidlnad)
      Tasks: 2 (limit: 9246)
        CPU: 183ms
     CGroup: /system.slice/minidlna.service
             └─779 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -S -r

janv. 30 00:23:41 RPI-5 systemd[1]: Started minidlna.service - MiniDLNA lightweight DLNA/UPnP-AV server.
janv. 30 00:23:42 RPI-5 minidlnad[779]: [2024/01/30 00:23:42] minidlna.c:670: error: Media directory "V,/home/serveur/Videos" not accessible [Permission denied]
janv. 30 00:23:42 RPI-5 minidlnad[779]: [2024/01/30 00:23:42] minidlna.c:670: error: Media directory "P,/home/serveur/Pictures" not accessible [Permission denied]
janv. 30 00:23:42 RPI-5 minidlnad[779]: [2024/01/30 00:23:42] minidlna.c:670: error: Media directory "A,/home/serveur/Music" not accessible [Permission denied]
serveur@RPI-5:~ $

Pourtant les droits sont correct

 serveur@RPI-5:~ $ ls -alh $HOME
total 11M
drwx------ 31 serveur serveur 4,0K 30 janv. 00:23 .
drwxr-xr-x  3 root    root    4,0K  5 déc.  06:26 ..
drwxr-xr-x  2 serveur serveur 4,0K 29 janv. 21:20 Music
drwxr-xr-x  3 serveur serveur 4,0K 29 janv. 21:20 Pictures
drwxr-xr-x  3 serveur serveur 4,0K 29 janv. 21:10 Videos
serveur@RPI-5:~ $

le fichier /etc/minidlna.conf

serveur@RPI-5:~ $ cat /etc/minidlna.conf                             
# This is the configuration file for the MiniDLNA daemon, a DLNA/UPnP-AV media
# server.
#
# Unless otherwise noted, the commented out options show their default value.
#
# On Debian, you can also refer to the minidlna.conf(5) man page for
# documentation about this file.

# Specify the user name or uid to run as (root by default).
# On Debian system command line option (from /etc/default/minidlna) overrides this.
#user=minidlna


# Path to the directory you want scanned for media files.
#
# This option can be specified more than once if you want multiple directories
# scanned.
#
# If you want to restrict a media_dir to a specific content type, you can
# prepend the directory name with a letter representing the type (A, P or V),
# followed by a comma, as so:
#   * "A" for audio    (eg. media_dir=A,/var/lib/minidlna/music)
#   * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
#   * "V" for video    (eg. media_dir=V,/var/lib/minidlna/videos)
#   * "PV" for pictures and video (eg. media_dir=PV,/var/lib/minidlna/digital_camera)
#media_dir=/var/lib/minidlna

media_dir=V,/home/serveur/Videos
media_dir=P,/home/serveur/Pictures
media_dir=A,/home/serveur/Music

#media_dir=PV,/var/lib/minidlna/digital_camera

# Set this to merge all media_dir base contents into the root container
# (The default is no.)
#merge_media_dirs=no

# Path to the directory that should hold the database and album art cache.
#db_dir=/var/cache/minidlna

# Path to the directory that should hold the log file.
#log_dir=/var/log/minidlna

# Type and minimum level of importance of messages to be logged.
#
# The types are "artwork", "database", "general", "http", "inotify",
# "metadata", "scanner", "ssdp" and "tivo".
#
# The levels are "off", "fatal", "error", "warn", "info" or "debug".
# "off" turns of logging entirely, "fatal" is the highest level of importance
# and "debug" the lowest.
#
# The types are comma-separated, followed by an equal sign ("="), followed by a
# level that applies to the preceding types. This can be repeated, separating
# each of these constructs with a comma.
#
# The default is to log all types of messages at the "warn" level.
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# Use a different container as the root of the directory tree presented to
# clients. The possible values are:
#   * "." - standard container
#   * "B" - "Browse Directory"
#   * "M" - "Music"
#   * "P" - "Pictures"
#   * "V" - "Video"
#   * Or, you can specify the ObjectID of your desired root container
#     (eg. 1$F for Music/Playlists)
# If you specify "B" and the client device is audio-only then "Music/Folders"
# will be used as root.
#root_container=.

# Network interface(s) to bind to (e.g. eth0), comma delimited.
# This option can be specified more than once.
#network_interface=

# Port number for HTTP traffic (descriptions, SOAP, media transfer).
# This option is mandatory (or it must be specified on the command-line using
# "-p").
port=8200

# URL presented to clients (e.g. http://example.com:80).
#presentation_url=/

# Name that the DLNA server presents to clients.
# Defaults to "hostname: username".
#friendly_name=

# Serial number the server reports to clients.
# Defaults to the MAC address of nework interface.
#serial=

# Model name the server reports to clients.
#model_name=Windows Media Connect compatible (MiniDLNA)

# Model number the server reports to clients.
# Defaults to the version number of minidlna.
#model_number=

# Automatic discovery of new files in the media_dir directory.
#inotify=yes

# List of file names to look for when searching for album art.
# Names should be delimited with a forward slash ("/").
# This option can be specified more than once.
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# Strictly adhere to DLNA standards.
# This allows server-side downscaling of very large JPEG images, which may
# decrease JPEG serving performance on (at least) Sony DLNA products.
#strict_dlna=no

# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
#enable_tivo=no

# Which method to use for registering in TiVo: 'bonjour' (default) or
# legacy 'beacon'
#tivo_discovery=bonjour

# SSDP notify interval, in seconds.
#notify_interval=895

# Path to the MiniSSDPd socket, for MiniSSDPd support.
#minissdpdsocket=/run/minissdpd.sock

# Always set SortCriteria to this value, regardless of the SortCriteria
# passed by the client
# e.g. force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title
#force_sort_criteria=

# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while streaming
#max_connections=50

# set this to yes to allow symlinks that point outside user-defined media_dirs.
#wide_links=no
serveur@RPI-5:~ $

Extrait de /var/log/minidlna/minidlna.log

serveur@RPI-5:~ $ cat  /var/log/minidlna/minidlna.log                                                 
minidlna.c:1126: warn: Starting MiniDLNA version 1.3.0.
minidlna.c:393: warn: Creating new database at /var/cache/minidlna/files.db
minidlna.c:1186: warn: HTTP listening on port 8200
scanner.c:730: warn: Scanning /var/lib/minidlna
scanner.c:819: warn: Scanning /var/lib/minidlna finished (0 files)!
playlist.c:135: warn: Parsing playlists...
playlist.c:269: warn: Finished parsing playlists.
monitor.c:222: warn: WARNING: Inotify max_user_watches [63364] is low or close to the number of used watches [0] and I do not have permission to increase this limit.  Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.
minidlna.c:200: warn: received signal 15, good-bye
minidlna.c:1126: warn: Starting MiniDLNA version 1.3.0.
minidlna.c:1186: warn: HTTP listening on port 8200
playlist.c:135: warn: Parsing playlists...
playlist.c:269: warn: Finished parsing playlists.
monitor.c:222: warn: WARNING: Inotify max_user_watches [63364] is low or close to the number of used watches [0] and I do not have permission to increase this limit.  Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.
upnphttp.c:1094: error: recv (state0): Connexion ré-initialisée par le correspondant
upnphttp.c:1094: error: recv (state0): Connexion ré-initialisée par le correspondant
upnphttp.c:1094: error: recv (state0): Connexion ré-initialisée par le correspondant
upnphttp.c:1094: error: recv (state0): Connexion ré-initialisée par le correspondant
serveur@RPI-5:~ $
 serveur@RPI-5:~ $ cat /proc/sys/fs/inotify/max_user_watches
63364
serveur@RPI-5:~ $
serveur@RPI-5:~ $ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
udev               3,8G       0  3,8G   0% /dev
tmpfs              805M    6,2M  799M   1% /run
/dev/mmcblk0p2      29G     20G  7,7G  72% /
tmpfs              4,0G    608K  4,0G   1% /dev/shm
tmpfs              5,0M     64K  5,0M   2% /run/lock
/dev/mmcblk0p1     510M     73M  438M  15% /boot/firmware
tmpfs              805M    224K  805M   1% /run/user/1000
serveur@RPI-5:~ $
serveur@RPI-5:~ $ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0     179:0    0 29,7G  0 disk 
├─mmcblk0p1 179:1    0  512M  0 part /boot/firmware
└─mmcblk0p2 179:2    0 29,2G  0 part /
serveur@RPI-5:~ $
serveur@RPI-5:~ $ sudo parted -l /dev/mmcblk0
Model: SD SK32G (sd/mmc)
Disk /dev/mmcblk0: 31,9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  541MB   537MB   primary  fat32        lba
 2      541MB   31,9GB  31,4GB  primary  ext4


serveur@RPI-5:~ $

D’ou vient le problème, l’installation est fraiche ?

Merci d’avance pour vos avis et conseils

Bonjour,

Tout semble bon sur le système
Une seule erreur apparaît

Selon cette erreur le problème viendrait donc du coté client, ou du serveur à communiquer avec le client? Essayer avec un autre client.

Pour aller plus loin coller cette erreur dans un moteur de recherche.

A+

Bonjour,

Je n’ai pas compris, vous dites

Selon cette erreur le problème viendrait donc du coté client, ou du serveur à communiquer avec le client? Essayer avec un autre client.

Quel est le serveur ou client utilisé actuellement avec minidlna ? Quel autre client utiliser ?
Merci d’avance.

Bonjour,

Je voulais dire d’essayer de se connecter avec un autre appareil.

A+