Sharing with Ownership of a Virtual Machine User
By default, Shared Folders are set to work in such a way that any user currently logged in to a virtual machine is considered as the owner of a shared folder and all files in it. To check that this mode of operation is enabled for a virtual machine, log in to it and examine the
# Parallels Shared Folder mount none /media/psf prl_fs sync,nosuid,nodev,noatime,share,context=system_u:object_r:removable_t:s0,nofail In general, to share a folder on the physical server with a virtual machine, you need to do the following:
Once you complete these steps, the shared folder should appear as a subdirectory in
For example, to share the
# prlctl set MyVM --shf-host on # prlctl set MyVM --shf-host-add Shared --path /home/SharedFolder
After that, the
# ls -l /home/SharedFolder total 4 -rw-r--r-- 1 root root 143 May 4 19:04 1.txt -rw-r--r-- 1 root root 0 May 4 19:04 2.txt
[bob@dhcp-10-30-21-207] ls -l /media/psf/Shared total 4 -rw-r--r--. 1 bob bob 143 May 4 19:04 1.txt -rw-r--r--. 1 bob bob 0 May 4 19:04 2.txt
As you can see, the files are exactly the same but owned by different users. While the owner of the files on the server is
If you now log off of the
[jack@dhcp-10-30-21-207]$ ls -l /media/psf/Shared total 4 -rw-r--r--. 1 jack jack 143 May 4 19:04 1.txt -rw-r--r--. 1 jack jack 0 May 4 19:04 2.txt
As for permissions for the
To unmount the
# prlctl set MyVM --shf-host-del Shared |
||||
|