pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mpd not coming up when booting



On Sun, Mar 13, 2011 at 11:41:06AM +0000, Sad Clouds wrote:
> On Sun, 13 Mar 2011 11:08:53 +0100
> Thomas Klausner <wiz%NetBSD.org@localhost> wrote:
> 
> > Hi!
> > 
> > I've installed the mpd rc.d script and added "mpd=YES" to rc.conf.
> > 
> > During boot, I get:
> > Starting mpd.
> > music directory is not a directory: "/archive/music/music"
> > playlist directory is not a directory:
> > "/archive/music/music/playlists" Failed to load database: Failed to
> > open database file "/archive/music/music/.mpddb": Permission denied
> > database: Couldn't stat parent directory of db file
> > "/archive/music/music/.mpddb": Permission denied /etc/rc.d/mpd exited
> > with code 1
> > 
> > # ls -ald /archive 
> > drwxr-xr-x  5 root  wheel  512 Jan 11 17:59 /archive
> > # ls -ald /archive/music 
> > lrwxrwxr-x  1 root  wheel  21 Jul 27  2009 /archive/music
> > -> /disk/3/archive/music
> > # ls -ald /archive/music/
> > drwxr-xr-x  13 wiz  archive  512 Feb 28 20:01 /archive/music/
> > # ls -ald /archive/music/music 
> > drwxr-xr-x  294 wiz  archive  7168 Mar  1 11:27 /archive/music/music
> > 
> > When I start the script manually after the boot, it works fine.
> > I thought it might be some mounting issue, so I added "mountall" to
> > REQUIRE in /etc/rc.d/mpd, but that didn't change a thing.
> > 
> > Any ideas what could go wrong here?
> >  Thomas
> 
> Maybe you need to mount some filesystems early during boot. Add
> something like this in /etc/rc.conf:
> 
> critical_filesystems_local="${critical_filesystems_local} /opt"

That's what I tried doing by the "mountall" REQUIRE in mpd, didn't
help.

> Or perhaps permission problems? On my machine mpd runs as user nobody,
> this is from my mpd.conf:
> 
> music_directory         "/opt/music"
> playlist_directory      "/opt/music/Playlists_mpd"
> log_file                "/opt/music/.mpd/mpd.log"
> error_file              "/opt/music/.mpd/mpd.error"
> db_file                 "/opt/music/.mpd/mpd.db"
> state_file              "/opt/music/.mpd/mpdstate"
> pid_file                "/opt/music/.mpd/mpd.pid"
> 
> user                    "nobody"
> 
> Hence permission on directories needs to be something like:
> 
> atom$ ls -ld /opt/music/.mpd
> drwxr-xr-x  2 nobody  nobody  512 Mar 13 09:38 /opt/music/.mpd
> 

I have user "wiz", and when I start it manually after boot (running
the rc.d script as root, like it would be run when booting), it works.

I included my permissions above, and they usually work for both wiz
and root.
 Thomas


Home | Main Index | Thread Index | Old Index