File sharing from GUEST VirtualBox ( 12.04 ) to HOST ( 10.04 )

5,190

Setting up shared folder can be done from Virtual Box as it was further elaborated in answers to these question:

However because it is so much easier to set up (and they safer in addition) I usually share folders to and from a virtual machine using basic network shares from the Nautilus right click "Sharing Options" menu. These can be set up anytime and will immediately be accessible from the "Browse Network" entry in Nautilus.

After right click on a directory from your HOME for Sharing Options we may be asked to download samba packages - do so. Then we tick the Share this folder box and give the needed permissions for this share to enable sharing over the network.

enter image description here

We may have to restart our session for changes to take effect. After having defined our shared directory we can browse it using Nautilus Browse Network where our share appears in the Windows Network/WORKGROUP/ directory.

enter image description here

Fo ease of use I have set my network adapter to bridged in the Virtual Box Manager.

Share:
5,190

Related videos on Youtube

David Marek
Author by

David Marek

Updated on September 18, 2022

Comments

  • David Marek
    David Marek over 1 year

    I've completed 90% of this walkthrough:

    https://help.ubuntu.com/community/VirtualBox/SharedFolders#Getting_VBoxLinuxAdditions.iso

    ... and I'm currently in the " Prepare Guest " section. Where this is giving me problems:

    sudo mount -t vboxsf -o uid=1000,gid=1000 $sharename /mnt/$sharename \

    the " -t " option is giving me issues as per this error message when running the full set of commands:

    mkdir invalid option --t

    Try ' mkdir --help ' for more information.

    So! If I've already configured the share on the host ... and I'm attempting to mount a local dir on the GUEST system for the HOST to view

    ... What should I be doing differently here?

    • Takkat
      Takkat over 11 years
      Where does the command mkdir come in? For shared folders see these questions: askubuntu.com/questions/30396/… askubuntu.com/questions/52328/…
    • David Marek
      David Marek over 11 years
      Thats kind of what is weird to me ... clearly something is incorrect with the commands listed on the page ... however I'm not sure what
    • David Marek
      David Marek over 11 years
      Also it seems that this is sharing from the HOST to the GUEST ... I need the HOST to be able to R/W on the GUEST VM
  • David Marek
    David Marek over 11 years
    So I've actually attempted to share via the right click option to no avail. I've run "gksudo nautilus" and enabled the sharing of the /usr/local/ dir with all permissions ... however I'm unable to open that up via the HOST machine. It should be accessible from within nautilus under the "Network" icon right?
  • Takkat
    Takkat over 11 years
    For security we should only share directories in our HOME. Sharing system directories e.g. in /usr/.. may lead to unwanted side effects or may even break your system. See edit for shots.
  • David Marek
    David Marek over 11 years
    'net usershare' returned error 255: net usershare add: failed to add share bety. Error was Operation not permitted .... is the error im getting ... and this is between two ubuntu installations
  • Takkat
    Takkat over 11 years
    You may need to make yourself member of the groups sambashare and shareaccess.