Author Topic: KVM shared folder permissions  (Read 802 times)

0 Members and 1 Guest are viewing this topic.

Offline stdio.h

  • Devotee
  • **
  • !
  • Posts: 107
    • View Profile
KVM shared folder permissions
« on: November 11, 2014, 12:52:10 am »
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?

Offline aldra

  • Arch Disciple
  • ***
  • Posts: 623
  • albrecht drais
    • View Profile
Re: KVM shared folder permissions
« Reply #1 on: November 11, 2014, 01:03:28 am »
I suspect it's unable to parse the permissions on the file properly because the guest and the host have different passwd files, but that doesn't really explain why chmod a doesn't work.

what's the filesystem of the shared drive? if it's FAT or something it might not even be storing the access changes