Iris and Mopidy Mobile are empty when music is on USB drive

I run mopidy with IRIS or Mopidy Mobile successfully as long as the music is in the /home/pi/music folder. I see all Artists and Tracks and can play them.
But when I switch my Music Folder to a USB stick (formatted with FAT32) with exactly the same content as the one in /home/pi/music both Iris and Mopidy Mobile show NOTHING. No content.
In my /etc/mopidy/mopidy.conf I have

[local]
media_dir = /media/pi/FAT32/UnsereMusik/Abba

Which contains just one Album and 60 Tracks.

The FAT32/UnsereMusik/Abba folder has these permissions.
drwxrwx— 2 root users 32768 Mär 26 2019 ‘ABBA - Gold (40th Anniversary Edition)’

When I run “sudo mopidyctl -v local scan” I get this result (just the last 2 lines):

INFO [MainThread] mopidy_local.commands Scanned 60 of 60 files in 7.986s.
INFO [MainThread] mopidy_local.commands Done scanning

But when I restart mopidy and restart iris I see no artists to albums and no tracks.

I have to add that I had to edit usr/sbin/mopidyctl
and change DAEMON_USER=“root”
otherwise I received “Permission Denied (13)” errors during Local Scan

With kind regards
Martin Klein

Have you tried adding the users group to the mopidy user ?

Many thanks for the hint. No it was not but I added it now.

pi@raspberrypi:~ $ groups mopidy
mopidy : audio video users

But it did not change anything. Both Iris and Mopidy Mobile do not show any content.

Found now the solution:

I am on Raspian Buster and this automounts USB-Sticks as soon as they are plugged in. But only for user “pi”.
Any “chmod” commands have no influence to authorisations of the USB Stick. Authorisations have to be done during mounting of the stick.

What I did was to add the details of the USB Stick to the end of /etc/fstab. I added one line:

UUID=XXXX-XXXX /media/usb vfat auto,nofail,umask=000,noatime,users,rw,uid=pi,gid=pi 0 0

Replace the XXXX-XXXX with the UUID of your drive. You can find it out with this command:

ls -l /dev/disk/by-uuid/

Check the line that refers to “/sda1”

Important is the option “umask=000” that defines that all users have access to the USB stick.

Now reboot and find the content of your stick at /media/usb.
Define this location in /etc/mopidy/mopidy.conf:

[local]
media_dir = /media/usb

Restart mopidy, do a local scan and you will find Iris and Mopidy Mobile working fine !

Note: Works only if your stick is formated as FAT32.

Kind Regards.
Martin Klein