I'm running an Ubuntu guest VirtualBox instance. I have a host folder
web-server being shared with the guest. On the guest, there are two users which need writable access to the shared folder: the daemon user
www-data, and a regular SSH login user which I'll call
jdoe, who are both members of the group I'll call
On the host, the folder looks like:
$ ls -al /Users/jdoe/web-server drwxrwsr-x 14 jdoe staff 448 Jun 19 11:04 .
On the guest, the folder is mounted with:
$ mount -t vboxsf -ogid=www-users web-server /usr/share/host/web-server
web-server on /usr/share/host/web-server type vboxsf (rw,nodev,relatime)
I've also attempted to add
jdoe to the
jdoe has the following groups:
jdoe adm sudo vboxsf ssl-cert www-users
While the setup appears to work on Windows and Ubuntu hosts, on OS X the guest user does not have writable access to the folder. The permissions on the guest appear as:
$ ls -al /usr/share/host/web-server drwxrwxr-x 1 root www-users 448 Jun 19 11:04 .
But when logged in as
jdoe, I cannot write to the folder:
$ touch /usr/share/host/web-server/foo touch: cannot touch '/usr/share/host/web-server/foo': Permission denied
If I change the mount to
jdoe can write to it, and if I change it to
www-data can write to it. In either case, other members of the
www-users cannot write to the folder.
Another note, I cannot rely on VirtualBox auto-mount, because this needs to work as it does in production, where drives get mounted on the fly.