You are not logged in.

#1 2011-10-03 09:43:23

kerasi
Member
Registered: 2011-07-07
Posts: 39

mpd permissions problem

Hello

i have a problem wih mpd and i can solve it :-( i think it must be a permission problem

here is my mpd.log

shaft@lubuntu:/etc$ cat /var/log/mpd/mpd.log 
Sep 22 13:20 : state_file: failed to open /var/lib/mpd/state: No such file or directory
Sep 27 20:25 : update: no read permissions on Back to Earth/Rivers of Life/08 - part I- Source of life.ogg
Sep 27 20:25 : update: no read permissions on Back to Earth/Rivers of Life/03 - Behind the mask.ogg

here my mpd.conf

shaft@lubuntu:/etc$ sudo grep -v "^#\|^$" /etc/mpd.conf
[sudo] password for shaft: 
music_directory		"/home/shaft/Musik"
playlist_directory		"/var/lib/mpd/playlists"
db_file			"/var/lib/mpd/tag_cache"
log_file			"/var/log/mpd/mpd.log"
pid_file			"/var/run/mpd/pid"
state_file			"/var/lib/mpd/state"
user				"mpd"
bind_to_address		"localhost"
input {
        plugin "curl"
}
audio_output {
	type		"alsa"
	name		"My ALSA Device"
	device		"hw:0,0"	# optional
	format		"44100:16:2"	# optional
	mixer_device	"default"	# optional
	mixer_control	"PCM"		# optional
	mixer_index	"0"		# optional
}
filesystem_charset		"UTF-8"
id3v1_encoding			"UTF-8"
shaft@lubuntu:~$ ls -l /home/shaft/Musik/
insgesamt 360
drwxr-xr-x 3 shaft shaft   4096 2011-09-29 14:25 Back_to_Earth

i will use mpd as user and let him open my home Folder /home/shaft/Musik

what have i to do?

Offline

#2 2011-10-03 12:38:18

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: mpd permissions problem

Start mpd as a user instead of root is the easiest way of avoiding permission issues:

https://wiki.archlinux.org/index.php/Mu … _as_a_user


I laugh, yet the joke is on me

Offline

#3 2011-10-03 12:52:12

kerasi
Member
Registered: 2011-07-07
Posts: 39

Re: mpd permissions problem

ok thank you for the answer i will try it when i come home thanks

Offline

#4 2011-10-03 16:35:24

kerasi
Member
Registered: 2011-07-07
Posts: 39

Re: mpd permissions problem

so i do it exactly like its in the wiki and i start the shel script but get those errors?

shaft@lubuntu:~$ mpd
Failed to bind to '127.0.0.1:6600': Address already in use
shaft@lubuntu:~$ mpd stop
Failed to open stop: No such file or directory
shaft@lubuntu:~$ mpd start
Failed to open start: No such file or directory
shaft@lubuntu:~$ 

my home directory

drwxr-xr-x  3 shaft shaft 4096 2011-10-03 18:16 .mpd
-rw-r--r--  1 shaft shaft 4603 2011-10-03 18:27 .mpdconf
shaft@lubuntu:~/.mpd$ ls -la
insgesamt 12
drwxr-xr-x  3 shaft shaft 4096 2011-10-03 18:16 .
drwxr-xr-x 29 shaft shaft 4096 2011-10-03 18:04 ..
-rw-r--r--  1 shaft shaft    0 2011-10-03 18:07 log
-rw-r--r--  1 shaft shaft    0 2011-10-03 18:16 mpd.db
-rw-r--r--  1 shaft shaft    0 2011-10-03 18:16 mpd.log
-rw-r--r--  1 shaft shaft    0 2011-10-03 18:16 mpd.pid
-rw-r--r--  1 shaft shaft    0 2011-10-03 18:16 mpdstate
drwxr-xr-x  2 shaft shaft 4096 2011-10-03 18:04 playlists
music_directory  "/home/shaft/Musik"
db_file  "/home/shaft/.mpd/database"
log_file "/home/shaft/.mpd/log"
pid_file  "/home/shaft/.mpd/pid"
state_file  "/home/shaft/.mpd/state"
playlist_directory  "/home/shaft/.mpd/playlists"
bind_to_address  "127.0.0.1"
bind_to_address  "/home/shaft/.mpd/socket"
#user                                 "user"
#group                                "nogroup"
port                                  "6600"
#log_level                            "default"
gapless_mp3_playback                  "yes"
#restore_paused                       "no"
#save_absolute_paths_in_playlists     "no"
metadata_to_use                       "artist,album,title,track,name,genre,date,composer,performer,disc,albumartist,albumartistsort"
auto_update                           "no"
#auto_update_depth                    "3"
#follow_outside_symlinks              "yes"
#follow_inside_symlinks               "yes"
#zeroconf_enabled                     "yes"
#zeroconf_name                        "Music Player"

#password                             "password@read,add,control,admin"
#default_permissions                  "read,add,control,admin"


###### INPUT PLUGINS #####

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

playlist_plugin {
       name                           "lastfm"
       user                           "USER"
       password                       "PASS"
}


##### DECODER #####

decoder {
       plugin                         "ffmpeg"
       enable                         "no"            #disable, because it crashes mpd, if m3u/pls files are present in music_directory
}


###### OUTPUT PLUGINS #####

#audio_output {
# type                                "alsa"
# name                                "Alsa Output"
# device                              "hw:0,1"  # optional
# format                              "44100:16:2"  # optional
# mixer_type                          "software"  # optional
##  mixer_device                      "default" # optional
# mixer_control                       "front-pcm"   # optional
##  mixer_index                       "0"   # optional
#}


#audio_output {
# type                                "recorder"
# name                                "My recorder"
# encoder                             "vorbis"    # optional, vorbis or lame
# path                                "/var/lib/mpd/recorder/mpd.ogg"
##  quality                           "5.0"     # do not define if bitrate is defined
# bitrate                             "128"     # do not define if quality is defined
# format                              "44100:16:1"
#}


#audio_output {
#  type                                "httpd"
#  name                                "Internet Stream"
#  encoder                             "vorbis"    # optional, vorbis or lame
#  port                                "8000"
#  bind_to_address                     "192.168.1.13"    # optional, IPv4 or IPv6
# quality                              "5.0"     # do not define if bitrate is defined
#  bitrate                             "128"     # do not define if quality is defined
# format                               "44100:16:1"
#  max_clients                         "1"     # optional 0=no limit
#}


#audio_output {
#        type                           "pulse"
#        name                           "Pulseaudio"
##      server                         "127.0.0.1   "          # optional
##      sink                           "remote_server_sink"    # optional
#}


audio_output_format                    "44100:16:2"
#samplerate_converter                  "Fastest Sinc Interpolator"
replaygain                             "album"
replaygain_preamp                      "6"
#volume_normalization                  "no"
#audio_buffer_size                     "2048"
#buffer_before_play                    "10%"
#connection_timeout                    "60"
#max_connections                       "10"
#max_playlist_length                   "16384"
#max_command_list_size                 "2048"
#max_output_buffer_size                "8192"
#filesystem_charset                    "UTF-8"
#id3v1_encoding                        "ISO-8859-1"


##### SIDPlay decoder ######

#decoder {
# plugin                               "sidplay"
# songlength_database                  "/media/C64Music/DOCUMENTS/Songlengths.txt"
# default_songlength                   "120"
# filter                               "true"
#}

i have no mpd anymore in /etc i renamed it what have i to do now?

shaft@lubuntu:~$ sudo service mpd stop
[sudo] password for shaft: 
sed: kann /etc/mpd.conf nicht lesen: Datei oder Verzeichnis nicht gefunden
sed: kann /etc/mpd.conf nicht lesen: Datei oder Verzeichnis nicht gefunden
awk: cannot open /etc/mpd.conf (No such file or directory)
 * /etc/mpd.conf must have pid_file set; cannot stop daemon.

Last edited by kerasi (2011-10-03 16:38:20)

Offline

#5 2011-10-03 17:41:45

kerasi
Member
Registered: 2011-07-07
Posts: 39

Re: mpd permissions problem

it works :-)

i have now my .mpdconf under my homedirectory

but when i will edit a song with typing

e     # i use ncmpcpp

it comes

couldnt read file /home/shaft/Musik/album/Club_Nouveau

what can i do?

Last edited by kerasi (2011-10-03 17:43:14)

Offline

#6 2011-10-03 18:58:58

kerasi
Member
Registered: 2011-07-07
Posts: 39

Re: mpd permissions problem

i found the mistake

in the ncmpcpp config

###################################################
## this is example configuration file, copy it to ##
## ~/.ncmpcpp/config and set up your preferences  ##
####################################################
#
##### connection settings #####
#
## set it in order to make tag editor and renaming files work properly
#
mpd_host = "localhost"
#
mpd_port = "6600"
#
mpd_music_dir = "home/shaft/Musik"
#

i forget / before home  :-)

Last edited by kerasi (2011-10-03 19:00:57)

Offline

#7 2011-10-03 19:13:20

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: mpd permissions problem

You need to edit the config file for ncmpcpp, it should be located in:

/home/[username]/.ncmpcpp/config

You need to change the line that reads:

mpd_music_dir = "/home/[username]/[nameofyourmusicdir]

That line needs to read exactly the actual path to your music directory.

Edit: Thanks for posting your config file.  You need to add a backslash in front of "home".  Try that and it should work.

Edit #2: Meh, you already figured it out.  That's what I get for taking too long to post.

Last edited by the sad clown (2011-10-03 19:15:42)


I laugh, yet the joke is on me

Offline

#8 2011-10-03 20:08:07

kerasi
Member
Registered: 2011-07-07
Posts: 39

Re: mpd permissions problem

hi again
but now i have another problem

when i switch to console 1 (because i will have full screen dispöyed) and start ncmpcpp and i start a song it says (Paused) i push P but nothing happens :-(
On my PC wehre mpd is user it works fine is that the reason that there the user is mpd? and here user=shaft?

Last edited by kerasi (2011-10-03 20:08:44)

Offline

#9 2011-10-03 20:59:29

the sad clown
Member
From: 192.168.0.X
Registered: 2011-03-20
Posts: 837

Re: mpd permissions problem

I don't know, as I have never tried to use ncmpcpp/mpd that way.  If you think it is because of the user level, you can try going back to root user by following the steps outlined in the mpd wiki.  The key to getting that to work, I believe, is modifying the permission of your music folder.  That too is covered in the wiki for mpd:

https://wiki.archlinux.org/index.php/Mu … yer_Daemon


I laugh, yet the joke is on me

Offline

#10 2011-10-04 16:41:39

ppr
Member
Registered: 2011-10-04
Posts: 32

Re: mpd permissions problem

I have the same problem (always paused) and before that the permissions problem. I think it's because of a upgrade (few days ago mpd with ncmpc works fine for me).

I don't think it a configuration problem (because I had a mpd system well configured before).

So I wait a fix...

Last edited by ppr (2011-10-04 16:44:51)

Offline

Board footer

Powered by FluxBB