vagrant-kvm icon indicating copy to clipboard operation
vagrant-kvm copied to clipboard

p9share: guest/host permissions

Open miurahr opened this issue 10 years ago • 3 comments

qemu's virtfs has a difficulty in host/guest owner/group and permissions.

It has three access modes.

1 mapped: Files are created with Qemu user credentials and the client-user's credentials are saved in extended attributes. 2 passthrough: Files on the filesystem are directly created with client-user's credentials. 3 none: It is equivalent to passthrough security model; the only exception is, failure of priviliged operation like chown are ignored. This makes a passthrough like security model usable for people who run kvm as non root.

In default, 'none' aka. 'squash' in configuration.

for squash, user need to take care of owner's and permissions both guest credentials and host qemu's uid/gid. Files and directories should be permitted to r/w for qemu(eg. libvirt-qemu/kvm) and guest(eg. vagrant/vagrant) in Ubuntu.

miurahr avatar Mar 04 '14 11:03 miurahr

Need document.

miurahr avatar Mar 23 '14 06:03 miurahr

Currently on Fedora 20, I have read only access to the shared directory, I don't know if it's what we want, but we need to document it.

adrahon avatar Jun 05 '14 11:06 adrahon

In recent Operating system, qemu/kvm run in its special user: libvirt-qemu or similar user. p9 shared folders are often owned by normal user. It happens that qemu cannot write shared folder because of owner mismatch. libvirt-qemu user cannot write in a directory owned by normal user that permission is usually 755, or 775.

miurahr avatar Jul 01 '14 06:07 miurahr