Permission denied when accessing VirtualBox shared folder when member of the vboxsf group

Solution 1:

I had added my user to the vboxsf group:

sudo usermod -aG vboxsf $(whoami)

I did do a restart, but after logging out and in again, I got access! Restarting after this and it still works. Go figure.

Solution 2:

I followed this procedure: Check that your user account is in the vboxsf group. Click on the bird icon, select Users and Groups → Manage Groups → vboxsf → Properties. Your user account should have a checkmark next to it. Check it if it is unchecked. When prompted for a password, enter secret.

Then a restart on the virtual machine (Power of the Machine) and this allowed for the shared folder to work.