Making MPD Find Symlinked Music Again


The Music Player Daemon aka. MPD is a great piece of software. It serves music over the network and can be controlled by various clients. However, it recently stopped to find my music on Ubuntu.

A symlink in /var/lib/mpd/music pointed to my music directory on an NTFS partition and has been working well so far. Then, it stopped doing so from one day to another. I think it already became noticable on 7.10 "Hardy Heron", before upgrading to the current development release ("Intrepid Ibex").

Copying a few files directly to /var/lib/mpd/music or a subdirectory thereof worked, however. Issuing sudo mpd --create-db listed those files as being added. The symlinked files didn't appear, though.

As the comments in the config file point out, the user the mpd is running as ("mpd" on Ubuntu) needs to be able to read the music path and files. chmod -R o+r /path/to/symlinked/music did the trick for files in my home directory, but not for those on the NTFS volume.

Today I came across the solution: Just add the "mpd" user to the "plugdev" group by issuing sudo usermod -G plugdev -a mpd, so it can access the NTFS volume. The -a argument is for appending to the list of groups. Check group memberships before and after altering them with groups mpd.

Now have fun listening to your music again :)