[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] filesharing file owner problem

On 7/16/19 8:08 AM, Vojto Ľach wrote:
  I'm having an issue with usage of libvirt driven qemu where I'm sharing
directory with guest machine.
virsh domain filesharing configuration:
     <filesystem type='mount' accessmode='passthrough'>
       <driver type='path' wrpolicy='immediate'/>
       <source dir='/media/share'/>
       <target dir='data'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x07'

/etc/libvirt/qemu.conf :
user = "root"
group = "root"
dynamic_ownership = 0
clear_emulator_capabilities = 0

So this configuration means that qemu is run under root:root. Libvirt does not interfere with the files a guest is creating. Libvirt does not get any event or anything. It's up to qemu to chown() the files.

I've just tested this with qemu from git and looks like labels are applied correctly. So maybe try upgrading your qemu?

even with this unsecure configuration I wasn't able to achieve that newly
created files/dirs in guest machine have ownership of guest machine user
but they are still created under root user id. Also strange is that group
of those files/dirs are correct.
Can somebody help me with this?

Thank you.

You're welcome :-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]