Mounting virtualbox osx share on ubuntu guest

Hello, this blog has moved to here : http://blog.ericgazoni.me, the blog on WordPress will be kept not to break links, but will not be updated anymore, see you there !

When using auto-mount I could list directory content, but only as root. When using my regular user, I had a “Permission denied” error. Apparently it’s an old issue that was not really fixed.

I spent an hour looking for this, so I’m posting it in hope it can help someone:

Let’s say I have a “Documents” shared folder on my OSX host, and I want to mount it on /media/my-share on the Ubuntu guest:

  • Install Vbox additions
  • Add the share in the “Shared Folders” screen, in Virtualbox, give full access, but don’t check auto-mount
  • Check your uid&gid on the Ubuntu guest (by doing a cat /etc/passwd and looking for the numbers after your name, mine are 1000 and 1000)
  • Add the following line in your guest’s /etc/fstab
Documents   /media/my-share  vboxsf  uid=1000,gid=1000,nodev,noexec,nosuid,auto,rw 0 0

 

About these ads

3 responses to “Mounting virtualbox osx share on ubuntu guest

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s