OpenWrt Forum Archive

Topic: mpc mpd : file access denied?

The content of this topic has been archived on 27 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi guys,
trying to add a local file using mpc gives the following error:

root@OpenWrt:~/.mpd# mpc add file:///tmp/sleep.mp3
error adding file:///tmp/sleep.mp3: Access denied

--------------------------------------------------------------------------------------------------------------
my mpd.conf has:

music_directory        "~/music"
playlist_directory        "~/.mpd/playlists"
db_file            "~/.mpd/database"
log_file            "~/.mpd/log"
pid_file            "~/.mpd/pid"
state_file            "~/.mpd/state"
sticker_file            "~/.mpd/sticker.sql"


user                "root"
group                "root"
bind_to_address "127.0.0.1"


------------------------------------------------------------------
i can play internet radio just fine, such as:

mpc add http://relay3.slayradio.org:8000/

this works. however, playing local files creates error.

any idea what kind of access denied it is talking about ? i even did chmod 777 on all the files and folder in ~/.mpd folder and /tmp/sleep.mp3

and there is nothing in the log for mpd either!!

after changing the log level, i get something:

Dec 11 06:42 : client: command_process_list: process command "add "file:///tmp/sleep.mp3""
Dec 11 06:42 : client: command_process_list: command returned -1
Dec 11 06:42 : client: [0] process command list returned -1
Dec 11 06:42 : client: [0] closed

its amazing how i end up finding solution as soon as i post it here.

all it needed is : /etc/init.d/mpd restart

just for record if anyone comes across this issue:

make sure to turn on verbosity:


log_level            "verbose"
auto_update    "yes"
auto_update_depth "3"
follow_outside_symlinks    "yes"
follow_inside_symlinks        "yes"


and then:

mpc update
mpc add sleep.mp3 ( i ran it inside the ~/music folder)
mpc play

The discussion might have continued from here.