Changes between Initial Version and Version 1 of Sharing_files_on_OSE

04/18/2007 05:08:48 PM (13 years ago)

Added a howto on sharing files without VBox shared folders


  • Sharing_files_on_OSE

    v1 v1  
     1= Sharing files between guest and host without VirtualBox shared folders = 
     3With the OSE version of VirtualBox you will not be able to use the Shared Folder facility offered by the version delivered as binary. 
     5This paper is also applicable for the binary version as another way of sharing folders between guest(s) and host. 
     7In 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. 
     9Another 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. 
     11== NFS == 
     12Configuration 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. 
     15# /etc/exports 
     16# Syntax: <folder>  <guest-IP-or-name>(<options>) 
     20If you need to add another share or modify an existing share, you can use the exportfs utility.  
     23exportfs -r                     # delete all exported folder 
     24exportfs -a                     # add all folder from /etc/exports 
     25exportfs  # add only given folder for the client with IP 
     26                                # 
     27exportfs                        # show which folder are shared 
     30On the guest, you have to insert the share into the file /etc/fstab.  For example:  
     3310.1.1.1:/var/exports  /mnt/shared nfs user,noauto,rw 0 0 
     36With this line the user can mount the directory /var/exports from the host owning the IP  
     38You can also mount the share automatically at boot time. In this case the fstab entry should be:  
     4110.1.1.1:/var/exports  /mnt/shared nfs rw,auto,rw 0 0 
     44'''Permissions Problems''' 
     46The 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.  
     48Note: NFS has no support for IPv6  
     50== CIFS / SAMBA == 
     52You 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. 
     54Most current Linux distributions have tools for configuring Samba so we will not show the code for this here. 
     56Don't forgot to set the password for the users - if you don't do this, you will not be able to mount the shared folder. 
     58Permissions 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. 
     60If your system has no built in support for mounting the shares directly, you can use the utility xsmbrowser in order to find shared folders and mount them.  
     62== SSH / SSHSF == 
     64SSHFS (Secure SHell FileSystem) [] is a FUSE (File System in Userspace) to implement a virtual file system which allows operations such as browsing, copying, editing, etc. from a file manager such as Konqueror (KDE) or Nautilus (GNOME). You only need a working ssh daemon on the host.  Most modern Linux distribution are configured so that you need only start the ssh service for this to work out of the box.  If there are problems you should look at the files /etc/hosts.deny which should contain a line:  
     67sshd : 
     70This allow connections from all hosts with an IP in the range to via ssh. 
     72If your guest don't support sshfs by default you must install fuse and sshfs. After this job is done you can mount the file system automatically or on request - see the sshfs FAQ page [].
ContactPrivacy policyTerms of Use