Minidlna error media directory not accessible

I have a secondary hard drive that is mounted as /media/Media and I would like to user a folder called Videos located on that drive that I would like to share the videos located on this folder out ...

I tried following the examples in this thread but still could not get it to work. I ended up stumbling on this article here: Running minidlna on Ubuntu and followed it step by step and I now have the media on my second drive being served through minidnla. If any one else struggles I suggest you follow his process.

I have quoted his text in case his page ever disappears.


He installed a service called minidlna which is supposed to allow streaming of media. However, it didn’t like the permissions on his chosen folder.
The path is /media/jw/drive2/foo.

jw@FooPC:~$ sudo service minidlna restart
* Restarting DLNA/UPnP-AV media server minidlna
[2014/07/23 21:03:30] minidlna.c:594: error: Media directory "/media/jw/drive2/foo" not accessible [Permission denied]

He pointed it to a folder in his home folder and it liked that just fine, but not the 2nd drive that holds the media.

He tried setting the user as me in the conf file and in the default file. But eventually He discovered he had to set the user as “root” to make it work.

He opened terminal and entered …

sudo gedit /etc/default/minidlna

…and edited the file…

# User and group the daemon should run as
USER=”root”
#GROUP=”minidlna”

…then saved and back to terminal and entered…

sudo gedit /etc/minidlna.conf

… and edited the file…

# Specify the user name or uid to run as.
user=root

He restarted the service using…

sudo service minidlna restart

… in terminal and this time there was no error about permissions.


I hope that helps someone as it helped me. If it helps you then please visit his page and leave him a comment like I did so he knows that his page is helping!

UPDATE:

This works straight away but if you power off the machine and then restart it the second drive is not served by the minidnla server until you run:

sudo service minidlna restart

Getting it to work from bootup is a user-mode drive problem and can be fixed by adding the drive to fstab. The downside is that the system will not boot automatically if the drive is not plugged in, as it will annoyingly demand to retry or ignore before continuing to boot.

An alternative to adding the drive to fstab is to restart the minidlna service at reboot from cron:

sudo crontab -e

then add the next line at the end of the file:

@reboot sleep 60 && sudo service minidlna restart

  • Index
  • » Networking, Server, and Protection
  • » Minidlna: «Media directory not accessible!»

#1 2012-01-16 23:19:53

chimeracoder
Member
From: New York
Registered: 2010-10-24
Posts: 73

Minidlna: «Media directory not accessible!»

I’ve installed Minidlna and set up my minidlna.conf according to the wiki page, but my files still aren’t showing up in my client (in this case a phone).

When I start the minidlna daemon, this is what happens:

chimeracoder ~ $  sudo /etc/rc.d/minidlna start
:: Starting minidlna                                                     [BUSY] 
Media directory not accessible! [/home/chimeracoder/music]
                                                                         [DONE]
media_dir=A,/home/chimeracoder/music

(which I have tried with the A and P content-type tags as well, as well as without the tags, both with and without the trailing backslash for the directory).

The server itself starts properly, and my client does pick up the <hostname>: nobody server, but it shows only the default Music/Pictures/Videos folders (which are empty, and which are not contained anywhere on the computer where I am running minidlna).

According to the wiki, the files have to be readable by the nobody user, so I tried chowning the directory and its contents to nobody:nobody, as well as setting the permissions to 755 and 777, but again, no luck.

#2 2012-01-17 08:29:57

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Minidlna: «Media directory not accessible!»

My folders are owned by my own user (group users) and set to 755. In ‘/etc/conf.d/minidlna’ I have ‘nobody’ set as the user to run minidlna from.

I have never seen that errormessage.

#3 2012-01-17 13:07:25

broken pipe
Member
Registered: 2010-12-10
Posts: 233

Re: Minidlna: «Media directory not accessible!»

does the directory really exist?
does the error occur when you run it under root, not sudo?

#4 2012-01-19 05:00:43

chimeracoder
Member
From: New York
Registered: 2010-10-24
Posts: 73

Re: Minidlna: «Media directory not accessible!»

Yes, the directory does exist, and the same thing happens when I run it with sudo or in a root terminal.

And /etc/conf.d/minidlna only has the following line:

The only thing I can think of is the group permissions — is ‘nobody’ supposed to belong to the users group (as my regular user does)? That doesn’t make sense, because I get the same error when I chown the files to nobody:nobody, but it’s the only thing I can think of.

#5 2012-01-19 19:44:44

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Minidlna: «Media directory not accessible!»

(you’ve probably already tried this, but nonetheless)

Have you tried setting MINIDLNA_USER to your username and chowning the files/folders to your name?

#6 2012-01-19 20:10:37

broken pipe
Member
Registered: 2010-12-10
Posts: 233

Re: Minidlna: «Media directory not accessible!»

thats really weird.
already tried to uninstall minidlna, remove any left files, maybe stored under /var/cache/?
any pacnew file which waits to be merged?
chmod the folder to 755, files to 644, chown to your user, users in general?

mind sharing your minidlna.conf for debugging?

just an example what i did and in my case it works:
chmod 755 /media/files/Musik
chown -R markus:users /media/files/Musik/

/etc/conf.d/minidlna —> MINIDLNA_USER=nobody

/etc/minidlna

port=42900
network_interface=eth0

# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
#   can prepend the type, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
media_dir=A,/media/files/Musik/
media_dir=V,/media/files/Videos/

# set this if you want to customize the name that shows up on your clients
friendly_name=Markus Desktop

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/home/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
#   which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=900

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# specify the path to the MiniSSDPd socket
#minissdpdsocket=/var/run/minissdpd.sock

# use different container as root of the tree
# possible values:
#   + "." - use standard container (this is the default)
#   + "B" - "Browse Directory"
#   + "M" - "Music"
#   + "V" - "Video"
#   + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.

#7 2012-02-29 22:33:44

rembo10
Member
Registered: 2011-10-11
Posts: 8

Re: Minidlna: «Media directory not accessible!»

I had to chmod my home folder to get it to work.

chmod 755 /home/user

then minidlna could see my /home/user/Videos folder just fine…. had to delete the old /var/cache/minidlna/files.db to refresh the database also.

another option would be to run minidlna as your user, and just make sure you can write to the log & cache directories

#8 2012-08-27 23:15:54

kwhershey
Member
Registered: 2012-08-27
Posts: 16

Re: Minidlna: «Media directory not accessible!»

I’ve been trying to run as my user, but I keep getting the error «chown: Invalid group» ‘username:username’.

My /etc/conf.d/minidlna is just one line:

MINIDLNA_USER=’username’

How do you specify the group?  I tried «MINIDLNA_USER=’group:username'» and adding the line «MINIDLNA_GROUP=users» but neither worked.

#9 2012-08-28 08:05:28

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Minidlna: «Media directory not accessible!»

I think I did that once, too. But it didn’t work.

Reading the post by rembo10 makes me realize my setup is different: I do not serve my media from my home-folder, but from /srv/media/, so I can set the rights of that folder without tampering with permissions on my home-folder.

And I also noticed that the ArchWiki was expanded with a nice article on minidlna. Maybe you’ll find the answer somewhere in there (and if you do, please report your solution…)

Last edited by zenlord (2012-08-28 08:05:43)

#10 2012-08-28 21:15:02

kwhershey
Member
Registered: 2012-08-27
Posts: 16

Re: Minidlna: «Media directory not accessible!»

I am serving my media from another drive, which is giving me this error:

[2012/08/28 16:06:38] minidlna.c:474: error: Media directory «/media/storage/Music» not accessible! [Permission denied]

Here is my fstab line for the drive:

/dev/sdb1        /media/storage     ntfs-3g        defaults,gid=users,fmask=133,dmask=002,umask=077,uid=1000        0 2

I added «nobody» to the users group so minidlna could have access, but I assume since it isn’t being called from the users group, it doesn’t have access? I don’t know how to edit the fstab line to give the nobody user access.

#11 2012-08-29 04:25:59

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,168

Re: Minidlna: «Media directory not accessible!»


Forum Rules

There’s no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

#12 2012-08-29 15:00:42

kwhershey
Member
Registered: 2012-08-27
Posts: 16

Re: Minidlna: «Media directory not accessible!»

When trying to follow the steps given by MrWeatherbee, I get an error with

> setfacl -m u:minidlna:rx /media/storage

This is the corresponding line for my setup.  Error is:

setfacl: /media/storage/: Operation not supported

Is this because I am not trying to serve out of my home directory, but off of a separate harddrive?

#13 2016-01-23 08:26:13

Strubbl
Member
Registered: 2013-12-10
Posts: 26

Re: Minidlna: «Media directory not accessible!»

I tried to share a folder under /home/, too. For me the solution was to set ProtectHome=off in /lib/systemd/system/minidlna.service and afterwards the usual steps:
sudo systemctl daemon-reload
sudo systemctl restart minidlna.service

#14 2016-01-29 06:32:45

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Minidlna: «Media directory not accessible!»

@Strubbl,

If you notice, the OP was not even using systemd, rather Arch Linux initscripts. A lot of things change over time, and this is why we discourage necrobumping.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • MiniDLNA can’t find my media directory

  1. MiniDLNA can’t find my media directory

    My media is stored on a separate partition from my Ubuntu 16.04 OS. It is set to auto-mount on startup and is on device sda5. When using mount in terminal, it shows that dev/sda5 is on /mnt/Media. I’ve tried both of those as «paths» in the /etc/minidlna.conf file and neither works (as you can see below). I’m kind of a noob to this stuff and am learning as I go, so if you can explain things simply that would be amazing. Thanks.

    Code:

    matt@MusicMaker2:~$ sudo minidlnad -R[sudo] password for matt: 
    [2016/09/10 16:13:24] minidlna.c:624: error: Media directory "P, /mnt/Media/Pictures" not accessible [No such file or directory]
    [2016/09/10 16:13:24] minidlna.c:624: error: Media directory "V, /dev/sda5" not accessible [No such file or directory]
    [2016/09/10 16:13:24] minidlna.c:624: error: Media directory "A, /dev/sda5" not accessible [No such file or directory]

    Update:
    I tried with the local directory of my pictures «/home/matt/Pictures» and that says «not accessible». Would that mean this is a permissions issue?

    Last edited by Matt_Dyck; September 11th, 2016 at 12:36 AM.


  2. Re: MiniDLNA can’t find my media directory

    The classical way to automount a partition at startup is to edit the fstab file which the OS will always read and execute. I am not familiar with method that you have used. Instructions for fstab are below:

    https://help.ubuntu.com/community/Fstab

    If you wish the partition to automount only when you need it, a more sophisticated and involved method is autofs. Instructions for autofs are below:

    https://help.ubuntu.com/community/Autofs


  3. Re: MiniDLNA can’t find my media directory

    It’s not the auto-mount I’m having trouble with. I already have that set up fine. It’s just the program MiniDLNA which says that any directories I have are unable to be accessed. I’m trying to use minidlna to share media across my home network, but because the program says «not accessible (No such file or directory)» I assume it doesn’t have the right permissions or something? Anyway, I hope I made that a bit more clear.


  4. Re: MiniDLNA can’t find my media directory

    Ah. My bad.

    I am completely unfamiliar with MiniDLNA so am afraid you will have to await response from a more knowledgeable poster. Sorry for the misunderstanding.


  5. Re: MiniDLNA can’t find my media directory

    First of all /dev/sda5 is a device not a directory. It is not a path you would supply to any application.

    If you’re sure that partition is being correctly mounted at started, what does the following show?

    Depending on how you’re mounting the partition, you might wind up with the name of the partitions as part of the path. For example, when I mount an USB external hard drive it might show up as /media/keith/My Passport. You might find there’s an extra level to the path that you have to account for, such as /mnt/Media/partitionname/Pictures

    Last edited by Keith_Helms; September 12th, 2016 at 06:03 AM.


  6. Re: MiniDLNA can’t find my media directory

    Code:

    matt@MusicMaker2:~$ ls -l /mnt/Mediatotal 3036
    drwxr-x--- 1 matt matt    8192 Aug 23 18:07 Documents
    drwxr-x--- 1 matt matt    4096 Jan  4  2016 Downloads
    drwxr-x--- 1 matt matt       0 Apr  3 12:10 found.000
    drwxr-x--- 1 matt matt   65536 Aug 29 19:41 Music
    drwxr-x--- 1 matt matt    4096 Jul  4 17:27 Pictures
    drwxr-x--- 1 matt matt       0 Nov  6  2015 $RECYCLE.BIN
    drwxr-x--- 1 matt matt       0 Nov  6  2015 System Volume Information
    drwxr-x--- 1 matt matt   12288 Sep  5 16:41 Videos

    This is what is shown for that. I figured that dev/sda5 was the device, but just tried it anyway since the other path hadn’t worked. The partition that gets mounted is called «Shared Partition», and I think I already tried adding that in, but I’ll try again just in case I didn’t.


  7. Re: MiniDLNA can’t find my media directory

    Still no luck. I’ve even tried with home/matt/pictures and it says the same thing.


  8. Re: MiniDLNA can’t find my media directory

    I’m trying to change the permissions now, but chmod doesn’t seem to work. I think it has something to do with the fact it’s a NTFS drive (forgot about that). So hopefully I can even figure this out myself, I’ll let you know.


  9. Re: MiniDLNA can’t find my media directory

    I switched over to Windows to change permissions on the drive to «Everyone», and it allowed me to change it there. But when I rebooted into Ubuntu, nothing had changed that I could see.


  10. Re: MiniDLNA can’t find my media directory


Bookmarks

Bookmarks


Posting Permissions

  • Печать

Страницы: [1]   Вниз

Тема: MiniDLNA не хватает прав для индексирования внешнего диска…  (Прочитано 1029 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
firststart

Чет замучился искать в интернете решение проблемы… может тут есть корифеи по этому вопросу…
В конфиге /etc/minidlna.conf:

media_dir=V,/media/max/ADATA
media_dir=P,/media/max/ADATA
media_dir=A,/media/max/ADATA

По команде:

service minidlna status
Выдает:

Как? Как мне его победить?

/media/max/ADATA$ ls -l


Оффлайн
Usermaster

Права на каталог DATA и его содержимое какие?


Оффлайн
firststart

Права на каталог DATA и его содержимое какие?

Вроде написал сразу…

/media/max$ ls -l
__________________________________
итого 4
drwxrwxrwx 1 max max 4096 янв  9 22:46 ADATA
__________________________________

/media/max/ADATA$ ls -l
__________________________________
итого 33935449
drwxrwxrwx 1 max max           0 янв  1  2014  BT
-rwxrwxrwx 1 max max  2322857732 фев 19  2021  Doubt.2008.x264.HDRip.1204.mkv
-rwxrwxrwx 1 max max 30084070256 дек 28 02:48  Downton.Abbey.2019.REMUX.mkv
drwxrwxrwx 1 max max         416 янв  9 22:51  Downton.Abbey.S03.1080p.BDRip
drwxrwxrwx 1 max max         672 янв  9 18:06  Downton.Abbey.S04.1080p.BDRip_MediaClub
drwxrwxrwx 1 max max         424 янв  9 18:05  Downton.Abbey.S05.1080p.BDRip
drwxrwxrwx 1 max max         416 янв  9 18:08  Downton.Abbey.S06.1080p.BDRip
-rwxrwxrwx 1 max max  2342962307 фев 19  2021 ‘Esli_ya_ostanusj_(2014).BDRip-AVC.Dub.Eng.sub.[All.Films][RG].mkv’
__________________________________


Оффлайн
Usermaster


Оффлайн
firststart

ls -lh /media

drwxr-x—+ 3 root root 4,0K янв  9 17:55 max


Оффлайн
Usermaster

Вот здесь вот и есть корень зла.
minidlna не может зайти в каталог max.


Оффлайн
firststart

Вот здесь вот и есть корень зла.
minidlna не может зайти в каталог max.

Совершенно верно. Спасибо. Все заработало.

« Последнее редактирование: 10 Января 2022, 12:56:19 от firststart »


  • Печать

Страницы: [1]   Вверх

Всем привет.
Помогите настроить minidlna, до этого на linux mint таких проблем не было.
Проблема в том, что ни одно устройство не видит файлы.
Конфиг

# port for HTTP (descriptions, SOAP, media transfer) traffic
# port=8200

# network interfaces to serve, comma delimited
# network_interface=eth0

# specify the user account name or uid to run as
# user=minidlna

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
# can prepend the types, followed by a comma, to the directory:
# + «A» for audio (eg. media_dir=A,/home/jmaggard/Music)
# + «V» for video (eg. media_dir=V,/home/jmaggard/Videos)
# + «P» for images (eg. media_dir=P,/home/jmaggard/Pictures)
# + «PV» for pictures and video (eg. media_dir=PV,/home/jmaggard/digital_camera)
# media_dir=/opt
media_dir=V,/home/kostya/Видео

# set this to merge all media_dir base contents into the root container
# note: the default is no
#merge_media_dirs=no

# set this if you want to customize the name that shows up on your clients
friendly_name=Linux Server

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/var/cache/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash («/»)
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# set this to beacon to use legacy broadcast discovery method
# defauts to bonjour if avahi is available
tivo_discovery=bonjour

# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=60

# serial and model number the daemon will report to clients
# in its XML description
#serial=12345678
#model_number=1

# specify the path to the MiniSSDPd socket
#minissdpdsocket=/var/run/minissdpd.sock

# use different container as root of the tree
# possible values:
# + «.» — use standard container (this is the default)
# + «B» — «Browse Directory»
# + «M» — «Music»
# + «V» — «Video»
# + «P» — «Pictures»
# + Or, you can specify the ObjectID of your desired root container (eg. 1$F for Music/Playlists)
# if you specify «B» and client device is audio-only then «Music/Folders» will be used as root
#root_container=.

# always force SortCriteria to this value, regardless of the SortCriteria passed by the client
#force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title

# 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

Понравилась статья? Поделить с друзьями:
  • Minidlna c 133 error bind http address already in use
  • Minecraft error 422 прохождение
  • Minicom input output error
  • Minecraft error 422 мод
  • Minecraft error 422 крипипаста