I'm trying to set up a shared folder on a KVM/qemu guest, but having trouble giving my host user rwx permissions on files transferred from the guest to the directory.
Qemu is confined by SELinux in this distro, so after a recursive relabel of the shared folder fcontext to svirt_image_t, chown -R user:user and chmod -R a+rwx, I can mount and transfer files into it from the guest. However, on the host the files are by default owned by the qemu user with no permissions given to others. I have to run a sudo chown user:user /path/to/file each time I want to open or move something out, which is a pain. User owned files transferred into the guest through the shared folder are fine.
Is there an easier way to configure the default owner, or am I going to have to write a script?