Here is the steps to share a folder in VirtualBox when windows is your host operating system and ubuntu is your guest operating system.
1) For your guest, you have to install the virtual box guest additions.
Download the virtual box guest additions from the website below:
http://download.virtualbox.org/virtualbox/4.0.0/
choose the
VBoxGuestAdditions_4.0.0.iso package and download it.You are downloading a .iso file. Therefore after you download you have to extract the including files into a folder. Enter to this folder,
and write the command below, in the terminal:
sudo sh ./VBoxLinuxAdditions-x86.run
The guest additions will be installed and then you will be asked to restart the computer.
For downloading the virtual box guest additions you can find additional information in the following website:
http://www.dedoimedo.com/computers/virtualbox-guest-addons.html
2) Define a folder name in the vitual box. Go to your host machine and then from
Devices -> Shared Folders
define a new shared folder. Define its location in your host and the name of the folder.
3) Finally, you have to mount this newly defined folder in host to a folder in your guest machine.
Enter the command below:
mount -t vboxsf work /mnt/yeter/
This command means that the folder that you defined in your host wachine, whose name is "work", will be mapped to a folder in your guest machine /mnt/yeter.
POSSIBLE ERRORS YOU CAN FACE WHEN YOU ARE FOLLOWING THIS PROCEDURE:
1) /sbin/mount.vboxsf: mounting failed with the error: Invalid argument
To solve this problem, please rename the shared folder in your host computer. For this case it is windows. Therefore, open Devices->shared folder and rename the folder and then give the command:
mount -t vboxsf calisma /mnt/shares/