Permission Denied when minidlna tries to read locally mounted shares

vegaramos1
Posts: 73
Joined: Thu Dec 16, 2010 6:00 pm

Permission Denied when minidlna tries to read locally mounted shares

Postby vegaramos1 » Thu Sep 26, 2019 8:13 pm

I recently installed Amahi 11 (Fedora 27). All my shares are Greyhole shares and I mounted them locally using the instructions provided here. The shares are mounted, but when I point minidlna to those shares locations I get a permission denied in the service status. Any suggestion on how I can get Minidlna to read these shares?


OS is up to date:
  • [al@localhost ~]$ clear
    [al@localhost ~]$ sudo dnf update
    Last metadata expiration check: 2:04:05 ago on Thu 26 Sep 2019 08:52:46 PM EDT.
    Dependencies resolved.
    Nothing to do.
    Complete!
Minidlna Status:
  • [al@localhost ~]$ sudo systemctl status minidlna.service
    ● minidlna.service - MiniDLNA is a DLNA/UPnP-AV server software
    Loaded: loaded (/usr/lib/systemd/system/minidlna.service; enabled; vendor preset: disabled)
    Active: active (running) since Thu 2019-09-26 22:52:53 EDT; 8s ago
    Main PID: 20528 (minidlnad)
    Tasks: 3 (limit: 9830)
    CGroup: /system.slice/minidlna.service
    └─20528 /usr/sbin/minidlnad -S

    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: minidlna.c:1094: warn: TiVo support is enabled.
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Music) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Movies) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Pictures) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/DVDs) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Music) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Movies) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/Pictures) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:125: error: inotify_add_watch(/mnt/samba/DVDs) [Permission denied]
    Sep 26 22:52:53 localhost.localdomain minidlnad[20528]: monitor.c:218: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [8] and I do not
Locally Mounted Greyhole Shares
  • [al@localhost /]$ ls -l /mnt/samba/
    total 0
    drwxrwx--- 2 al users 0 Sep 8 23:20 Books
    drwxrwx--- 2 al users 0 Sep 18 23:18 Crashplan
    drwxrwx--- 2 al users 0 Sep 18 20:52 Docs
    drwxrwx--- 2 al users 0 Sep 26 17:07 DVDs
    drwxrwx--- 2 al users 0 Sep 18 06:08 ITunes
    drwxrwx--- 2 al users 0 Sep 22 15:15 Movies
    drwxrwx--- 2 al users 0 Sep 18 06:30 Music
    drwxrwx--- 2 al users 0 Sep 21 19:04 Pictures
    drwxrwx--- 2 al users 0 Sep 18 00:33 Podcast
    drwxrwx--- 2 al users 0 Sep 8 23:21 Public
    drwxrwx--- 2 al users 0 Sep 18 06:37 Software
    drwxrwx--- 2 al users 0 Sep 8 23:21 TV
    drwxrwx--- 2 al users 0 Sep 18 20:42 Videos
    [al@localhost /]$
Minidlna Config File:
  • # port for HTTP (descriptions, SOAP, media transfer) traffic
    port=8200

    # network interfaces to serve, comma delimited
    network_interface=docker0

    # 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,/mnt/samba/Music
    media_dir=V,/mnt/samba/Movies
    media_dir=P,/mnt/samba/Pictures
    media_dir=V,/mnt/samba/DVDs

User avatar
bigfoot65
Project Manager
Posts: 11441
Joined: Mon May 25, 2009 4:31 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby bigfoot65 » Sat Sep 28, 2019 2:49 pm

Ensure the share permissions are correctly set in the script.

Should be 775.
ßîgƒσστ65
Applications Manager

vegaramos1
Posts: 73
Joined: Thu Dec 16, 2010 6:00 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby vegaramos1 » Sun Sep 29, 2019 10:54 pm

I changed line number 28 in the mount_shares_locally file from:

Code: Select all

/sbin/mount.cifs "//127.0.0.1/$d" "$d" -o credentials=/home/${username}/.smb_credentials,uid=${uid},gid=${gid},file_mode=0660,dir_mode=0770,nobrl,hard,_netd ev,iocharset=utf8,noserverino,mfsymlinks
To:

Code: Select all

/sbin/mount.cifs "//127.0.0.1/$d" "$d" -o credentials=/home/${username}/.smb_credentials,uid=${uid},gid=${gid},file_mode=0775,dir_mode=0775,nobrl,hard,_netdev,iocharset=utf8,noserverino,mfsymlinks
Unmounted the shares with

Code: Select all

service mount_shares_locally stop
remounted the shares with

Code: Select all

systemctl daemon-reload service mount_shares_locally start
I restarted minidlna.service. The error messages are now gone, but it's not finding any of my files and when I check the dashboard I don't see the file count incrementing. I also don't see the log file in /var/log/minidlna. Any suggestions?

User avatar
bigfoot65
Project Manager
Posts: 11441
Joined: Mon May 25, 2009 4:31 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby bigfoot65 » Mon Sep 30, 2019 6:08 am

You may need to remove the share directories in /mnt/samba after you stop the script.

Seems like I had to do that the last time I used it.
ßîgƒσστ65
Applications Manager

vegaramos1
Posts: 73
Joined: Thu Dec 16, 2010 6:00 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby vegaramos1 » Mon Oct 07, 2019 9:16 pm

So I removed the shares and re-added them. This time minidlna does index the shares correctly. However when I try to view any movie, picture, or listen to a song, the file is not played. It will just time out waiting. Any suggestions for this issue?

User avatar
bigfoot65
Project Manager
Posts: 11441
Joined: Mon May 25, 2009 4:31 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby bigfoot65 » Tue Oct 08, 2019 5:03 pm

I just realized that you don’t need to use locally mounted shares for dlna App.

That’s to use when modifying files via command line on the HDA. Read the first sentence for mount shares locally in the wiki

The app only reads and plays files, so no need to use the script.

Point the app to the normal shares path.

Sorry I didn’t think about this sooner.
ßîgƒσστ65
Applications Manager

vegaramos1
Posts: 73
Joined: Thu Dec 16, 2010 6:00 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby vegaramos1 » Thu Oct 10, 2019 8:25 pm

I've tried with both the locally mounted shares and the normal greyhole location (eg. /var/hda/files/music), but in both cases the result is the same, whenever I try to stream a file, the client times out. BTW, I tried reinstalling minidlna as well, but that didn't work either.

User avatar
bigfoot65
Project Manager
Posts: 11441
Joined: Mon May 25, 2009 4:31 pm

Re: Permission Denied when minidlna tries to read locally mounted shares

Postby bigfoot65 » Fri Oct 11, 2019 7:25 am

Check /var/log/amahi-app-installer.log for errors.

Seems like there may be a component missing.

Also check system logs for indication of issues.
ßîgƒσστ65
Applications Manager

Who is online

Users browsing this forum: No registered users and 3 guests