diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-11-09 16:31:10 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2013-11-10 14:07:29 +0100 |
commit | b9f5b880e7893227b13c707d03bbafaf0f620855 (patch) | |
tree | 24ee84eb03c87292cec4d71851136846e6ec27f5 /nixos/modules/virtualisation/libvirtd.nix | |
parent | edfd4cbb03d659ab372cbc2ca65c352ae0f56de2 (diff) |
nixos/libvirtd-service: fix for dnsmasq (dir perms 700 -> 755)
Fixes this:
Nov 09 16:18:54 nixos-laptop systemd[1]: Starting Libvirt Virtual Machine Management Daemon...
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: read /etc/hosts - 2 addresses
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: failed to load names from /var/lib/libvirt/dnsmasq/default.addnhosts: Permission denied
Nov 09 16:18:54 nixos-laptop dnsmasq[15809]: cannot read /var/lib/libvirt/dnsmasq/default.hostsfile: Permission denied
Nov 09 16:18:55 nixos-laptop systemd[1]: Started Libvirt Virtual Machine Management Daemon.
I don't understand the reason for the original 700 permission bits.
Apparently read-access is needed and Ubuntu also use 755 perms.
Use "chmod" instead of "mkdir -m" to set permissions because mkdir doesn't
modify permissions on existing directories.
Diffstat (limited to 'nixos/modules/virtualisation/libvirtd.nix')
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index d3884a503bc7..552441f6a62d 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -82,8 +82,11 @@ in mkdir -p /var/log/libvirt/qemu -m 755 rm -f /var/run/libvirtd.pid - mkdir -p /var/lib/libvirt -m 700 - mkdir -p /var/lib/libvirt/dnsmasq -m 700 + mkdir -p /var/lib/libvirt + mkdir -p /var/lib/libvirt/dnsmasq + + chmod 755 /var/lib/libvirt + chmod 755 /var/lib/libvirt/dnsmasq # Libvirt unfortunately writes mutable state (such as # runtime changes to VM, network or filter configurations) |