P
P
Pavel11142018-04-09 10:43:54
linux
Pavel1114, 2018-04-09 10:43:54

How to overcome "Failed to stat directory Permission denied" when starting mpd?

I have ubuntu 16.04.
With the help of fstab, an ext4 partition with multimedia is mounted to it

UUID=4309fbe1-f600-4afb-8179-f1cc0fe553b5 /media/pavel/multimedia           ext4    user,rw,nosuid,nodev        0       2

I'm trying to set up mpd to work with the music database from this section
mpd config
music_directory		"/media/pavel/multimedia/music/"

playlist_directory		"/var/lib/mpd/playlists"

db_file			"/var/lib/mpd/tag_cache"

log_file			"/var/log/mpd/mpd.log"

pid_file			"/run/mpd/pid"

state_file			"/var/lib/mpd/state"

sticker_file                   "/var/lib/mpd/sticker.sql"

user				"mpd"

#group                          "nogroup"

bind_to_address		"localhost"

input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

audio_output {
  type		"pulse"
  name		"My Pulse Output"
  mixer_type	"software"	# optional
#	server		"remote_server"		# optional
#	sink		"remote_server_sink"	# optional
}


(didn't change anything except enable pulseaudio and music directory)
When I start mpd I get an error
Apr 09 13:24 : config: Failed to stat directory "/media/pavel/multimedia/music": Permission denied

The user mpd was added to the pavel group. Permissions for the drwxrwxr-x pavel pavel music directory.
When choosing a directory from the home partition, everything works fine.
sudo -u mpd ls /media/pavel/multimedia/music/ also works.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kisaa, 2018-04-09
@kisaa

https://bbs.archlinux.org/viewtopic.php?id=107387
tl;dr: check permissions on all parent levels (specifically /media)

V
vanoc, 2018-04-09
@Zoro

namei -l /media/pavel/multimedia/music

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question