I have a virtual machine setup through virt-manager, and I am trying to give the vm access to a folder on the host system.
I added a Filesystem, and I can read from the host directly but I cannot write to it.
<filesystem type='mount' accessmode='passthrough'>
<source dir='/opt/test'/>
<target dir='testlabel'/>
</filesystem>
It is mounted on boot from fstab using,
testlabel /opt/test 9p trans=virtio 0 0
The folder on the host system is owned by my user on the host system, and I cannot change ownership to the user in the guest system because that user doesn't exist on the host.
tl;dr Aside from setting the folder permission to 777, how can I setup the folder permissions to allow read/write access for the guest vm user?