Ubuntu – admin no longer has access to shared folder

12.04command lineguest-additionsshared-foldersvirtualbox

So over the weekend I arrive to work, boot my PC and run the virtualbox session of Ubuntu but now I get the message:

The folder contents could not be displayed
You do not have the permissions necessary to view the contents of "sf_virtual"

I don't understand what could have happened? I did install an update and read an article to re-install Guest Additions and it still doesn't allow access in /media. When I do gksudo nautilus and then sudo ls -al /media/sf_virtual it will display all the files in virtual as -rwxrwx--- 1 root vboxsf numbers month date time filename. When I am under name in the terminal ls /media/sf_virtual it returns Permission denied. Any ideas on how to get access back? I have removed the shared folders and added new ones but it still doesn't work.

Best Answer

It sounds like your user is no longer a member of the vboxsf group - you can check by using the id command in a terminal or getent group vboxsf

If that's the case, you can add the user back with

sudo gpasswd --add <username> vboxsf

or the equivalent adduser or usermod command

You will probably need to log off and back on for the change to take effect

Related Question