Accessing shared Windows folders in Sun (Oracle) VirtualBox

I've used Sun VirtualBox (Now Oracle VirtualBox) for a couple of years as a handy way to run Linux on my Windows-based laptop.  It broke a while back and I only just got around to reinstalling it using the new 4.0.0 release - and found shared folders didn't work out of the box.  I could set one up - and I could see it - but it wouldn't allow me access - I got the following error:

You do not have the permissions necessary to view the contents of "sf_virtualbox_sharename"

A little looking around led me to the fact that my Ubuntu user was not part of the group "vboxsf" which apparently creates the share.  So, the fix is simple: just add your user to that group using the following command (using your Ubuntu username):

usermod -a -G vboxsf username

You will also need to have Guest Additions installed for this to work.

Hope that helps someone...