Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MPD database permission issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
noursferoce
n00b
n00b


Joined: 05 Aug 2015
Posts: 1

PostPosted: Wed Aug 05, 2015 9:54 pm    Post subject: MPD database permission issue Reply with quote

Hi all,

This my first post, I'm using Gentoo for a couple of year, stumble into a lot of issues (as anybody I suppose) and until now I managed them successfully using this very forum the wiki and so on. But here I could not find a solution, so I request your hep.

I'm setting up an mpd server, and I would like to have mpd running with his own user mpd, so I configured it this way in my mpd.conf :
Code:
# General music daemon options ################################################
#
# This setting specifies the user that MPD will run as. MPD should never run as
# root and you may use this setting to make MPD change its user ID after
# initialization. This setting is disabled by default and MPD is run as the
# current user.
#
user                            "mpd"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
group                           "audio"


When I put a music file into the default music location /var/mpd/music, it appears in the database I can play and listen to it, no issue.

The problem happen when I change the music location to /home/my_user/Music, then when I'm running mpd here is what I get :
Code:
config_file: loading file /etc/mpd.conf
path: SetFSCharset: fs charset is: UTF-8
vorbis: Xiph.Org libVorbis 1.3.5
config: Failed to stat directory "/home/my_user/Music": Permission denied
db: reading DB
curl: version 7.43.0
curl: with OpenSSL/1.0.2d
state_file: Loading state file /var/lib/mpd/state
inotify: initializing inotify
errno: inotify_add_watch() has failed: Permission denied
No protocol specified

And the database is empty of course.

Here are the permission of the music folder :
Code:

drwxr-xr-x 358 my_user audio     20K Aug  5 17:32 Music

I changed the group to audio to grant access to mpd, because it's running with the audio group as specified in the config file.

The weird thing is, if I use the exact same permission user and group for the /var/lib/mpd/music folder and change the config file accordingly to scan this folder, it's working perfectly.

The INOTIFY flags mpd needs in the kernel config file is enabled.

Thanks for your help,
Back to top
View user's profile Send private message
tastytea
n00b
n00b


Joined: 01 May 2013
Posts: 7
Location: Germany

PostPosted: Mon Sep 07, 2015 3:01 pm    Post subject: Reply with quote

What are the permissions of $HOME? If mpd can't access $HOME, it can't access $HOME/Music
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum