You are not logged in.

#1 2006-05-26 22:04:22

Kragen
Member
Registered: 2006-05-26
Posts: 15

running MPD as non-root with init script [Solved]

Just fired up arch today and I have to say I'm very impressed smile

Anyway, I'm trying to install MPD, i've been having a collection of problems, but i think I've finally gotten it working. It runs without error if I run "mpd" from the command line, but running the "/etc/rc.d/mpd start" script returns these errors:

:: Starting Music Player Daemon                                          [BUSY]
/etc/rc.d/mpd: line 14: /var/run/mpd.pid: Permission denied
touch: cannot touch `/var/run/daemons/mpd': Permission denied
                                                                         [DONE]

I've changed the user value in mpd.conf to my username (I suppose I could run it as root, but for the sake of learning about linux, i'd like to do it properly smile), so I can see why I'm getting the permission error's, but I dunno what to do about it short of changing the permissions of all the random files it wants access to (which doesnt seem like such a good idea).

Offline

#2 2006-05-26 22:24:59

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: running MPD as non-root with init script [Solved]

From mpd.conf:

################# SECURITY SETTINGS ######################
#
# It is encouraged to run MPD as
# non-superuser.  If you start mpd as root
# (for example, in an init script), set
# this value, then  mpd will drop root priveleges
# and runs as the user specified.

What that means, is that you still need to START mpd as root, but it will take care of dropping root privilege as soon as it doesn't need it anymore (ie after it's done with those files)


The suggestion box only accepts patches.

Offline

#3 2006-05-26 22:38:38

Kragen
Member
Registered: 2006-05-26
Posts: 15

Re: running MPD as non-root with init script [Solved]

ah, so it was me being stupid  :oops:

thanks smile

Offline

Board footer

Powered by FluxBB