Непонятка с mpd и ~/.mpd/mpd.log

Столкнулся со странным поведением mpd.
MPD прописан в rc.conf но не стартует с в месте с системой. Причина в том, что файл ~/.mpd/mpd.log имеет права root(это со стартом системы) После того, как я отдаю ~/.mpd/mpd.log пользователю user и стартую mpd он запускается.
sudo chown user:1000 /home/user/.mpd/mpd.log
и
sudo /etc/rc.d/mpd start

Все запускается, и Sonata нормально работает. Но после reboot все повторяется заново.
Вот часть файла /etc/mpd.conf
$ cat /etc/mpd.conf
# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This 
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory		"~/Music"
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use 
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
#playlist_directory "/var/lib/mpd/playlists"
playlist_directory      "~/.mpd/playlists/playlists"
#
# This setting sets the location of the MPD database. This file is used to
# load the database at server start up and store the database while the 
# server is not up. This setting defaults to disabled which will allow
# MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol.
#
#db_file "/var/lib/mpd/mpd.db"
db_file                 "~/.mpd/mpd.db"
# 
# These settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level
# settings.
#
# The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog, otherwise logging is disabled.
#
#log_file "/var/log/mpd/mpd.log"
log_file                "~/.mpd/mpd.log"
#
# This setting sets the location of the file which stores the process ID
# for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored.
#
#pid_file "/var/run/mpd/mpd.pid"
pid_file                "~/.mpd/mpd.log"
#
# This setting sets the location of the file which contains information about
# most variables to get MPD back into the same general shape it was in before
# it was brought down. This setting is disabled by default and the server 
# state will be reset on server start up.
#
#state_file "/var/lib/mpd/mpdstate"
state_file             "~/.mpd/mpdstate"
#
# The location of the sticker database.  This is a database which
# manages dynamic information attached to songs.
#
#sticker_file			"~/.mpd/sticker.sql"
#
###############################################################################
# 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"
user "user"
#
...
###############################################################################

MPD в группу users добавлен:
sudo gpasswd -a mpd users
Так же добавил пользователя user в группу log
sudo gpasswd -a user log


Что я делаю не так?
Химичишь. Для начала запусти изкоробочный вариант mpd, там всё как нужно прописано, кроме пути к музыке.

cp /usr/share/mpd/mpd.conf.example /etc/mpd.conf

не трогай никакие настройки кроме пути к музыка, запусти, проследи, а после внимательно смотри, что ты сделал не так.

Хотя… я нашёл у тебя в конфиге ошибку: внимательно посмотри параметры log_file и pid_file, ничего похожего не видишь? ;-) уже понимаешь, почему log файл каждый раз становится рутовым? рассказать? ;-)
systemd должен умереть.
h4tr3d
спасибо, запустил, ошибку нашел.
 
Зарегистрироваться или войдите чтобы оставить сообщение.