I have a virtual machine here which I use for development, so as not to mess anything up in my existing environment.
I've made a share named "web" available to the guest OS (Ubuntu 12.10 Server) from the host OS (Ubuntu 12.04 Desktop). I have configured it to automatically mount in /etc/fstab
with the following line:
web /var/www vboxsf defaults,uid=1000,gid=1000 0 0
However, when I reboot, it's definitely not mounted, the /var/www
folder shows the default install's index.html
file, not the contents of the shared folder.
If I run sudo mount
, I see the mount in the output:
web on /var/www type vboxsf (uid=1000,gid=1000,rw)
web on /media/sf_web type vboxsf (gid=1001,rw)
It seems to also be mounted in a different location which I didn't setup.
If I try to remount all the mounts in /etc/fstab
by running sudo mount -a
, it still is not mounted.
I can only get it mounted by manually mounting it using mount
. Where is this other mount location coming from and why is what I'm doing not working?
Best Answer
Apparently, I had "auto-mount" enabled in VirtualBox configuration for the instance. This messes with things, so I simply added my user to the
vboxsf
group (in addition towww-data
) and pointed Apache to/media/sf_web
.