VBox shared folders help

Discussion in 'sandboxing & virtualization' started by aigle, Dec 14, 2009.

Thread Status:
Not open for further replies.
  1. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    I am using Win 7 guest on Ubuntu host in VB. How can I share folders between them.

    Host Ubuntu is shahbaz-laptop
    Guest Win 7 is SHAHEEN-PC.

    Networking is NAt that was default. I set a shared folder in the setting of VM. When i go into guest OS( Win7) and try Map network drive, it can see nothing except guest PC itself.

    I need a bit of spoon feeding as networking stuff is way above my mind. Read the tutorial by Mrk but still no way.

    Thanks

    1.jpg
    2.jpg
    3.jpg
     
  2. tobacco

    tobacco Frequent Poster

    Joined:
    Nov 7, 2005
    Posts:
    1,497
    Location:
    British Columbia
    Hey Aigle

    Just went thru this myself the other day. You have to use "Bridge" NOT "Nat" and then select your adapter from the drop down box just below bridge.
     
  3. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Thanks. I made two mistakes.

    1- Using NAT
    2- I was trying to locate shared folder via Browse. Infact I just added the path as \\vboxsvr\Windows7 and it worked.
     
  4. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    OK, can any one tel me whether I should use Bridged or Host Only network? and why?

    Thanks
     
  5. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    Host only, only if you want to have a secluded internal network.

    Bridged, if you want the virtual machine to become another host on your network and you can then connect to it by IP, like you would on a physical lan. This however requires that you can lease more than one IP. If you're directly connected to ISP, you might not be able to, if you they only give you one IP, but it you have a router, then you can.

    Bridged is good for services (open ports).

    Mrk
     
  6. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Thanks Mrk.
     
  7. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Sorry for bumping old thread. I have Ubuntu host with Win 7 and ubuntu as guest OS.

    Win 7 guest has no problem with shared folders but I have problem with Ubuntu guest.
    I tried to mount shared folder( mine) via command:

    sudo mount -t vboxsf ubuntu /home/shahbaz/mine

    It mounted but the permissions to access the shared folder "mine" are only for root. How can I access it( I tried to mount it as user but can,t).

    Thanks
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      39.4 KB
      Views:
      124
  8. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    From the command line:
    sudo chown yourname <folder> -R *

    Now its yours.

    Or, if you want to keep the root ownership, but be able to read and write:
    sudo chmod 777 <folder>

    Mrk
     
  9. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Thanks.

    Tried

    sudo chown shahbaz mine -R

    sudo chmod 777 mine

    None worked. :'( What is * after R?

    Thanks again.
     
  10. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,695
    It's asterix, plain and simple as is.
    Can you post the commands you're trying to do, like cd into the directory.
    Mrk
     
  11. aigle

    aigle Registered Member

    Joined:
    Dec 14, 2005
    Posts:
    11,047
    Location:
    Saudi Arabia/ Pakistan
    Ok thanks, will post screenshots. But to go into directory i did not used commands. I went via file manager after executing commands you wrote.
     
Thread Status:
Not open for further replies.