Borrow: http://www.dbasoul.com/2010/695.html
1. Install the enhancement package (guest additions)
Reference: Install virtualbox enhancement in Debian
2. Set Shared Folders
After the restart, click "devices"> shared folders to add a shared folder. The fixed and temporary options refer to whether the folder is persistent. Share names can be any one you like, such as "share". Try to use an English name.
3. Mount Shared Folders
Re-enter the virtual Debian and enter the following in the command line terminal:
Sudo mkdir/mnt/shared
Note: If you do not create a folder, it may be a problem.
Sudo Mount-T vboxsf share/mnt/shared
"Share" is the name of the previously created shared folder. OK. Now Debian and the host can upload files to each other.
If you do not want to manually mount each time, you can add
Share/mnt/shared vboxsf RW, gid = 100, uid = 1000, auto 0 0
This enables automatic mounting.
4. Run the following command to uninstall the SDK:
Sudo umount-F/mnt/shared
Note:
The name of the shared folder must not be the same as that of the mount point. For example, the above mount point is/mnt/shared. If the shared folder name is also shared, the following error message will appear during mounting:
/Sbin/mount. vboxsf: mounting failed with the error: Protocol Error