You are on page 1of 2

Sharing files between guest and host without VirtualBox shared folders

About Screenshots Downloads Documentation End-user docs Technical docs Contribute Community With the OSE version of VirtualBox you will not be able to use the Shared Folder facility offered by the version delivered as binary. This paper is also applicable for the binary version as another way of sharing folders between guest(s) and host. In order to share folders you must use the “Host Interface” networking facility. This allows you to use network file systems as NFS which are available on UNIX systems such as for example Solaris, the various BSD incarnation and Linux. NFS has the advantage of being easy to configure and the disadvantage that possibly insecure services are necessary. If your guests are Microsoft products, you must install an NFS driver on them or use CIFS (Windows file sharing) which is implemented by samba on UNIX systems. Another way of sharing folders is available on modern Linux systems under Gnome or KDE: you can use SSHFS, which uses the SSH protocol to simulate a file system. This is a more secure way.

Configuration of NFS is very easy. On the host you must install an NFS server and stat it. You can declare the folders which are to be exported in the file /etc/exports. # /etc/exports # Syntax: <folder> <guest-IP-or-name>(<options>) /var/exports,sync) If you need to add another share or modify an existing share, you can use the exportfs utility. exportfs -r exportfs -a exportfs exportfs # # # # # delete all exported folder add all folder from /etc/exports add only given folder for the client with IP show which folder are shared

On the guest, you have to insert the share into the file /etc/fstab. For example: /mnt/shared nfs user,noauto,rw 0 0

With this line the user can mount the directory /var/exports from the host owning the IP You can also mount the share automatically at boot time. In this case the fstab entry should be: Permissions Problems The permissions for the shared files and directory are based on the user ID. If the host is running Fedora Core for example and the guest Ubuntu, the standard user will not have the same UID and therefore bob on the host is not the same user as bob on the guest. In order to overcome this you must make sure that the user IDs on both systems are the same. Note: NFS has no support for IPv6 /mnt/shared nfs rw,auto,rw 0 0

You must install a samba server for this and start it after you have configured it. You must also create a password for the users which are allowed to connect to the share.

0 This allow connections from all hosts with an IP in the range 10.deny which should contain a line: sshd : 10. After this job is done you can mount the file system automatically or on request .1.see the sshfs FAQ page http://fuse.255.1. If your system has no built in support for mounting the shares directly.0/255. If your guest don't support sshfs by default you must install fuse and sshfs. you will not be able to mount the shared folder. from a file manager such as Konqueror (KDE) or Nautilus (GNOME). you can use the utility xsmbrowser in order to find shared folders and mount them. Permissions are based on the user name and you will have read/write access to the directories and files if your samba server is set up correctly.php/SshfsFaq. etc. copying.Most current Linux distributions have tools for configuring Samba so we will not show the code for this here.1 to 10. Most modern Linux distribution are configured so that you need only start the ssh service for this to work out of the Contact – Privacy policy .255.sourceforge. If there are problems you should look at the files /etc/hosts.wikipedia.254 via ssh. editing. You only need a working ssh daemon on the is a FUSE (File System in Userspace) to implement a virtual file system which allows operations such as browsing.1.if you don't do this.1. SSH / SSHSF SSHFS (Secure SHell FileSystem?) http://en. Don't forgot to set the password for the users .