You are not logged in.

#1 2010-05-16 02:19:46

Whatintheworldisthat
Member
Registered: 2007-08-21
Posts: 13

[SOLVED]Bizarre mpd permission problem

I have mpd working perfectly on my laptop. However, I have a spare box on which I would like to have another mpd server. I tried following the instructions in the wiki exactly, with the following at /etc/mpd.conf:

music_directory "/home/MYUSER/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
log_file "/var/log/mpd/mpd.log"
error_file "/var/log/mpd/mpd.error"
pid_file "/var/run/mpd/mpd.pid"
state_file "/var/lib/mpd/mpdstate"
user "mpd"

This is the exact setup I have on my laptop, the permissions on my music directory and files are the same and yet starting mpd (as root) gives me this:

failed to stat music directory "/home/MYUSER/music": Permission denied

I even tried doing chmod -R ugao+rwx on the music directory and files and still got the error..... mpc update hangs and updating via ncmpcpp completes right away, but not files are added.

sad Ideas?

Last edited by Whatintheworldisthat (2010-05-16 03:31:23)

Offline

#2 2010-05-16 03:23:58

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: [SOLVED]Bizarre mpd permission problem

everyone always forgets...

in order to read a directory's contents, you must be able to traverse (+x) its parent.  by default, your ~/ is only +x for you.  so user "mpd" cannot enter it to read ~/Music. 

your choices are:

  run mpd as you (i do this, its way easier)
 
  grant +x on ~/ (probably a bad idea)
 
  bind mount or mv your music to somewhere fully accessible to user mpd (bind mounts are easy -- go google)

Last edited by brisbin33 (2010-05-16 03:24:58)

Offline

#3 2010-05-16 03:30:48

Whatintheworldisthat
Member
Registered: 2007-08-21
Posts: 13

Re: [SOLVED]Bizarre mpd permission problem

Wisdom. I would say I forgot this, but in fact I never learned it, thanks.

Offline

Board footer

Powered by FluxBB