Navidrome: Permission denied!

Author T. V.
Date
License CC BY-SA 4.0

This is a somewhat digressive description of me solving a problem I had with Navidrome. The solution is at the end.

Navidrome is a self-hosted streaming service. Imagine being able to upload your own MP3 files to something like Spotify. I recently installed it on my Raspberry Pi. I followed this installation guide, and when I put the music files in the default directory, i.e. /opt/navidrome/music/, everything worked beautifully.

However, the SD card of my Raspberry Pi has limited storage, so I decided to move the music library to an external USB drive. I formatted the drive as ext4, copied the files into a directory named muzika/, and plugged the drive into the Raspberry Pi. The system automatically mounted the disk at /media/tom/kokainum/, and I updated Navidrome’s configuration file (/etc/navidrome/navidrome.toml) accordingly:

DataFolder = "/var/lib/navidrome"
MusicFolder = "/media/tom/kokainum/muzika"
LastFM.ApiKey = "XXX"
LastFM.Secret = "XXX"

At this point, Navidrome could no longer detect the music library. It had worked before, but now it failed to scan the directory. To investigate, I checked the logs using the following command:

> sudo journalctl -u navidrome -f

When I initiated a full scan via Navidrome’s web interface, I encountered the following error:

Jun 24 11:49:06 malina navidrome[3252]: time="2025-06-24T11:49:06+01:00" level=warning msg="Scan warning: getting fs for library: stat /media/tom/kokainum/muzika: permission denied: /media/tom/kokainum/muzika"

Evidently, Navidrome lacked the necessary permissions to access the files. I attempted to resolve this by making the entire directory universally accessible, recursively applying read, write, and execute permissions:

> sudo chmod -R 777 /media/tom/wokenni-kokainum/

Unfortunately, this had no effect. I still saw the same error. (If you know why this did not work, you can contact me on the Fediverse.)

What worked was:

After these steps, Navidrome was once again able to detect the music library.