[Nix-dev] Permission error when installing mpd

Kirill Elagin kirelagin at gmail.com
Thu Feb 19 07:49:56 CET 2015


As is clear from the log, it is not mpd who creates the directory, it’s the

~~~~
preStart = "mkdir -p ${cfg.dataDir} && chown -R mpd:mpd  ${cfg.dataDir}";
~~~~

line it its unit file. The permission error likely happens because it
doesn’t have the search (x) permission. Remember that it is running as
`mpd` user. Are you sure you want to have the `dataDir` in your home?

On Thu Feb 19 2015 at 9:23:28 AM Nikita Karetnikov <nikita at karetnikov.org>
wrote:

> I've tried various options, but mpd always fails with a permission error.
> Here's one example:
>
>   services.mpd.enable = true;
>   services.mpd.dataDir = "/home/nikita/dotfiles/mpd/.mpd";
>   services.mpd.musicDirectory = "/home/nikita/music";
>
> Both directories exist.
>
> $ journalctl -u mpd.service
>
> Feb 19 09:11:22 mu systemd[1]: Starting Music Player Daemon...
> Feb 19 09:11:22 mu systemd[1]: mpd.service: control process exited,
> code=exited status=1
> Feb 19 09:11:22 mu systemd[1]: Failed to start Music Player Daemon.
> Feb 19 09:11:22 mu systemd[1]: Unit mpd.service entered failed state.
> Feb 19 09:11:22 mu systemd[1]: mpd.service failed.
> Feb 19 09:11:22 mu mpd-pre-start[15264]: mkdir: cannot create directory
> ‘/home/nikita’: Permission denied
>
> Why is it even trying to create "/home/nikita"?
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150219/ac3fd39f/attachment.html 


More information about the nix-dev mailing list