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.
systemd --user
overriding the "umask". Also, if you move photos into such a shared directory from a camera SD card mounted byudisks
, the same problem occurs even without systemd. https://unix.stackexchange.com/questions/278396/shared-read-write-photo-directory-tree-for-normal-users/430380#430380 Also note, if you have the correct umask set as per https://security.ias.edu/how-and-why-user-private-groups-unix , group writes will be permitted, without needing a default ACL. – sourcejedi Jun 21 '18 at 12:11