How To Share Files And Folders Between VirtualBox’s Ubuntu 11.04 Virtual Machine And Windows 7 Host

Sometimes, you just have to move files from your VirtualBox’s Ubuntu 11.04 virtual machines to a Windows 7 host, but how?  It’s simple really!  There are couple ways of doing it, but I prefer to keep it simple.  The steps are below:

  1. Start VirtualBox
  2. Highlight a virtual machine in the list of virtual machines
  3. Click on Settings
  4. Go to Shared Folders
  5. Click on Add Shared Folders
  6. From drop down box of Folder Path, choose Other
  7. Pick a folder from your system that you have permission to access
  8. Check the box that says Auto mount
  9. Click OK button
  10. Click OK button again to save everything
  11. Start your Ubuntu 11.04 virtual machine (i.e., the one you have added a shared folder for)
  12. Inside Ubuntu 11.04 virtual machine, open up Control Center >> System >> Users and Groups
  13. Click on Manage Groups
  14. Scroll down till you see a group labeled as vboxsf, highlight it, and then click on Properties
  15. Place a check mark inside a box next to the user that you want to give access to shared folder(s)
  16. Click OK, and you have to enter your sudo’s password or root password or just a password of a user who has administrative authority
  17. Navigate to folder/directory labeled as media inside Ubuntu 11.04 virtual machine using either Nautilus or Terminal
  18. Change into the directory which begins with sf_, because a folder/directory inside media folder/directory that has sf_ prefix is a shared folder that you created earlier using VirtualBox.
  19. If using Nautilus, you can right click on empty space to create a folder with a folder name of your choosing.  If using Terminal, you can execute this command [mkdir Testing].  Remember, you should do this as a normal user, a user which you’d gave permission to access this shared folder a bit earlier using Ubuntu.  If you can create a test folder with a folder name of your choosing inside the directory with prefix sf_ in folder/directory media, it means you are officially able to transfer files and folders inside Ubuntu 11.04 virtual machine to your Windows 7 host.
  20. To double check to see if everything is working, navigate to your Windows 7 host and go to the shared folder that you’d allowed VirtualBox to share it with Ubuntu 11.04 virtual machine earlier.  If everything is working out, you should now see a test folder/directory you had created in step 19.

That’s it!  Have fun moving files from your Ubuntu 11.04 virtual machine(s) to your Windows 7 Host and vice versa!

11 thoughts on “How To Share Files And Folders Between VirtualBox’s Ubuntu 11.04 Virtual Machine And Windows 7 Host

  1. Nvm i completed step 17 but now when i try to access it it was bash: cd: permission denied
    this seems to be a problem for some other people too and i have followed through all the steps again and still makes the same error

    • Make sure you are using the account (i.e., username) that you had allowed to access the directory which begins with the label sf_ inside the media directory. You can type this command inside the terminal: ls -la sf_directoryname. Don’t forget to replace directoryname with the correct directory name. This commands will tell you the user (i.e., username) that is the owner of the sf_directoryname and which group of this sf_directoryname belongs to. If it’s the same as the user you are using to access it, then something else must be wrong. To tell the truth, it’s sort of hard for me to figure out without being at the very computer that has problems. I hope you will be able to figure out the problems soon. Good luck!

  2. I still dont get what you mean in step 17 it says navigate to a directory labelled as media? how would you do that in terminal or do we have to make a directory called media

    please reply im stuck

  3. thanks for your kind reply.
    hi i hve given the permission in the window ful permission to everyone to share.

    I would like what does the above errore means.

    In step17 Navigate to folder/directory labeled as media inside Ubuntu 11.04 virtual machine using either Nautilus or Terminal.
    this means what how to do. kindly help me….

    • I’m not sure this will solve your problems, but I suspect that you stuck at step number 8 since auto mount isn’t working somehow. Therefore you can’t really access the drive. If this isn’t the case, then you must have not add the right users to group vboxsf in step number 15.

      In step 17, I mean open up Nautilus to navigate to the folder that begins with the label of sf_something (something is where the folder name that you decide to share between windows and ubuntu through virtualbox’s virtual machine setting). Of course, if you don’t like to use Nautilus, then use Terminal to do so, but using Terminal, you need to use command lines. Such as cd /home/yourusernamehere/sf_thesharefoldernamehere and so on.

      If you don’t know what Nautilus is, it’s something similar to Windows Explorer, but Nautilus is for Ubuntu and Windows Explorer is for Windows.

  4. hi kindly help i can see the drive E and F the windows in ubuntu. i am using latest VB 4.1.8. i have given permission in windows for the drives. but i cant assess. when i click the drive it shows this error :- The folder contains could not displyed. You do not have the permissions necessary to view the contents of “sf_E_DRIVE”….

    then when i click the drive to see sharing option. it shows this error:-
    ” net usershare’ returned error 255: net usershare add: cannot share path /media/sf_E_DRIVE as we are restricted to only sharing directories we own.
    Ask the administrator to add the line “usershare owner only = false”
    to the [global] section of the smb.conf to allow this. ”

    As you told to ad user group i hav added.from step 17 i culd not do it. also nautilus is already install in my vertual machine.

    kindly help me…… plz plz plz

    • I’m not sure I understand your problem, but you should check the step number 7 to see if you have picked a folder that you have permission to access. From step number 7, work your way back down to step number 17 again to see if you can solve your problem or not. It seems there is a permission problem somewhere along the line which prevents you to access the drives that you want.

  5. Pingback: Moving Files From Linux To Windows Using Virtual Machine As Key Element | EssayBoard

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.