This guide assumes you have Navidrome installed as a systemd service under the user navidrome, and you want to index music synced via the OneDrive client in your home directory.


Problem Context

  • You want Navidrome to read music stored in OneDrive, which is synced under your home folder:

    ~/OneDriveAlbums/MAIN/Public/Music/Albums
    
  • You tried creating a symlink to /music:

    ln -s ~/OneDriveAlbums/MAIN/Public/Music/Albums /music
  • Navidrome failed to index the files:

    permission denied
    
  • Logs showed:

    Error resolving path: lstat /home/ubuntu/OneDriveAlbums: permission denied
    

Key Causes

  1. Navidrome runs as user navidrome, not your main Ubuntu user.

  2. Linux requires execute (x) permission on every parent directory for traversal.

  3. OneDrive only syncs inside your home directory (~), so moving files elsewhere prevents syncing.

  4. ACL tools (setfacl) were missing initially.

  5. ls tests may appear “denied” at /home/ubuntu, but traversal can still work if properly configured.


Step 1 — Ensure OneDrive Sync Works

  • OneDrive music must remain inside your home directory, e.g.:

    /home/ubuntu/OneDriveAlbums/MAIN/Public/Music/Albums
    
  • Ensure files are fully downloaded (not cloud-only placeholders).

  • Verify:

    ls ~/OneDriveAlbums/MAIN/Public/Music/Albums

Step 2 — Install ACL support

  • Navidrome requires ACLs to grant access to navidrome without opening your whole home directory.

  • Install ACL tools:

sudo apt update
sudo apt install acl
  • Verify:
setfacl --version

  • Keep music in OneDrive, expose it to Navidrome via /music:
sudo mkdir -p /music
ln -s /home/ubuntu/OneDriveAlbums/MAIN/Public/Music/Albums /music/Albums

Step 4 — Fix permissions

a) Grant navidrome traversal on home

  • Navidrome must be able to enter /home/ubuntu:
sudo setfacl -m u:navidrome:x /home/ubuntu

b) Grant navidrome read + traverse on OneDriveAlbums

sudo setfacl -R -m u:navidrome:rx /home/ubuntu/OneDriveAlbums
sudo setfacl -R -d -m u:navidrome:rx /home/ubuntu/OneDriveAlbums
  • -R → recursive

  • -d → default ACL for new files

c) Ensure /music is accessible

sudo chmod 755 /music

Step 5 — Verify permissions

Run these commands as navidrome:

sudo -u navidrome ls /music/Albums
sudo -u navidrome ls "/music/Albums/Frank Ocean - Blonde (FLAC)"

✅ If files list properly, Navidrome can read them.

Note: ls /home/ubuntu will likely still say “Permission denied”. This is normal; Navidrome only needs traversal, not directory listing.


Step 6 — Configure Navidrome

  • Ensure MusicFolder in Navidrome points to /music:
MusicFolder = "/music"
  • Restart Navidrome:
sudo systemctl restart navidrome
  • Trigger a full scan from the web UI.

Step 7 — Confirm logs & streaming

  • Monitor logs:
sudo journalctl -u navidrome -f
  • Expected: No permission denied errors.

  • Play a track to verify streaming works.


Summary of Problems & Fixes

ProblemCauseFix
Navidrome cannot read /music/AlbumsNavidrome user lacked access to home directoriessetfacl -m u:navidrome:x /home/ubuntu
Navidrome cannot read OneDrive filesPermissions on OneDrive foldersetfacl -R -m u:navidrome:rx ~/OneDriveAlbums and default ACLs for new files
setfacl: command not foundACL tools not installedsudo apt install acl
Moving OneDrive folder outside ~ breaks syncOneDrive client only syncs inside homeKeep folder in ~/OneDriveAlbums
ls /home/ubuntu still fails as navidromeHome dir read not granted (only traversal needed)This is fine; only traversal required

Best Practices

  1. Keep OneDrive music inside $HOME to allow syncing.

  2. Use ACLs to give minimal permissions rather than opening your home directory globally.

  3. Use symlinks to expose multiple music sources to /music.

  4. For new files added by OneDrive, default ACLs ensure Navidrome can see them automatically.

  5. Restart Navidrome after permission changes.


Back References: