When attemping to add shared folder from a Host machine to a Guest VirtualBox machine you may encounter the following error.
This location could not be displayed. “You do not have permissions necessary to view the contents of “sf_Shared”
This error is caused due to a lack of permission by the VirtualBox user.
How to resolve VirtualBox error?
In order to resolve open a terminal and add the user to the group vboxsf.
sudo adduser username vboxsf
If you are unsure which user your are logged in as you can use the following command.
whoami
Due to the way that VirtualBox mounts these shared folders your guest machine will need to be restarted. Once your machine is restarted it will be possible to access the contents of your shared folder.