2

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?

  • Future referece; for me i totally had the path wrong, i had added vboxfs in the modules, not sure if thats needed now for me, but make sure you do this as well. – Brian Thomas Aug 17 '17 at 0:59
4

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 to www-data) and pointed Apache to /media/sf_web.

  • same issue for centos7 with latest version of VirtualBox - a bug to raise on their github maybe? Either way this is a correct solution for it :) – treyBake Nov 16 '17 at 10:16
  • Alternatively you can turn off auto-mount, which is what I did. But this provided the clue, so thanks. – Alfred Armstrong Aug 20 '18 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.