Here's the situation -
- I have a 1TB drive mounted at
/data
. - There are multiple local users on the desktop. All of them are in the
localusers
group - I have a virtualbox VM with a 50 GB VDI dsik stored at
/data/common/vms
I would like the virtualbox VM to be available to all members of the localusers
group.
What I've done so far:
- As the primary user, create the VM
- Moved the vbox machine folder to
/data/common/vbox
[so if the machine is Win10Pro, then I have the folder at/data/common/vbox/Win10Pro
] - Group Perms - group of the folder to
localusers
andchmod -R g+rw /data/common/vbox /data/common/vms
- Copied over
~/.Virtualbox/Virtualbox.xml
and adjusted Default machine folder and machine entry to point to/home/user/VirtualBox VMs
. ln -sf /data/common/vbox/Win10Pro ~/VirtualBox VMs/Win10Pro
for each user
The problem
This only works once... If as user X I open virtualbox and launch the machine, then the permissions on the /data/common/Win10Pro/*
file(s) revert to rw only for the user after the Virtualbox GUI exits.
PS: Earlier I used toe have the disk formatted as exfat and was able to achieve a shared disk/vm using the uid and gid masks but that doesn't work for ext4.