Saturday, October 8, 2016

Error Accessing Shared Folder under Ubuntu Client (Virtual Box)

I am running Ubuntu 16.06 client virtually under Windows 7 Virtual Box. As normal to all user running another operating system virtually, I need to access the data on my Windows 7 from my Ubuntu.
[the version of Virtual Box that I am running now is 5.1.6, Ubuntu 16.04, and updated (Oct 2016) Windows 7 Pro SP1]

Under Virtual Box setting, you can easily share the folder on Windows 7 that you wish to access from Ubuntu. Simply go to Devices > Shared Folders > Shared Folders Settings...

From there you can choose the folder on Windows 7 that you wanted to shared to Ubuntu.
You need to make sure that you check the box for Auto-mount and  Make Permanent for Ubuntu to automatically mount the shared folder.

After OK  to the setting, you will need to reboot Ubuntu for the change applied.

For my case I shared 2 folder/drive to Ubuntu from Windows 7. After rebooting Ubuntu, I can see those 2 folder appear (sf_F_DRIVE and sf_D_DRIVE) under my File Explorer (Nautilus).

However the problem here is once I click on either one of the link, it show the message: This location could not be displayed. You do not have the permissions necessary to view the contents of "xxxx".

After googling around, I found out that the problem is related to the current user (under Ubuntu) not added to the vboxsf group (which had permission to view the files). Therefor the fix for this is to add current user to the vboxsf group. The script for this fix:
sudo adduser $USER vboxsf

For the changes to be effective, you will need to Log Out on Ubuntu and re-Log In. After that you shouldn't be having problem accessing the shared drive/folder.

No comments:

Post a Comment