I'm using kvm-qemu/libvirtd for a bunch of kvms. I'm using vnc for the graphical interface. By default, it listens on a tcp socket. I want to have it listen on a unix socket instead. Looking at some docs (http://libvirt.org/formatdomain.html) I see:
"Rather than using listen/port, QEMU supports a socket attribute for listening on a unix domain socket path"
I have this setup with the following xml:
<graphics type='vnc' socket='/tmp/lamptest.sock'/>
This is working, it creates the socket and everything goes through it. But it doesn't have the permissions the way I would like them. It has them as such, which doesn't allow me to use virt-manager with my user:
srwxr-xr-x 1 libvirt-qemu kvm
Instead I would like to have to have the socket with the following permissions:
srwxrwx--- 1 root libvirtd
I haven't found anyway to change this in the xml, and I would like to not have to manually change it whenever a kvm starts up. Anyone know if this can be configured somewhere?
EDIT:
looking at this patch link, it looks like that functionality doesn't exist. I'll poke through newer versions of the code to see if it was added, but I'm guessing I'll need to submit a feature request and write a cron to fix file permissions in the mean time :(