LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2016, 06:14 PM   #1
iFunction
Member
 
Registered: Nov 2015
Posts: 189

Rep: Reputation: Disabled
Share folder on Virtual Machine


Hi there,

Trying to share a folder from host to Virtual Machine.
Guest Additions installed
Host - Linux Mint
Guest - Linux CentOS

So I have gone through the whole making a shared folder on the host machine, well shared the public folder and made it public with read and write permissions.

Added it to the devices on the Virtual Machine, but it does not show up. Drag and drop also does not work. How else can I get a file onto the Virtual Machine please.
 
Old 08-20-2016, 09:07 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,352
Blog Entries: 12

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
I am assuming you mean you are trying to create a VirtualBox shared folder, as opposed to a Samba/NFS share, and it's not working and playing well with others.

If you are using a bridged adapter in the VB network settings for this VM, your VM would be on the same subnet as the host and you could easily use scp or even a Samba/NFS share to move files back and forth. Make sure the firewall is enabled in the guest, just as it should be on a regular computer, if you wish to go that route, or it could be a vector for an intrusion into your network.

Last edited by frankbell; 08-20-2016 at 09:11 PM.
 
Old 08-20-2016, 09:10 PM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,835

Rep: Reputation: 260Reputation: 260Reputation: 260
It should show up as a network folder on the guest. The folder doesn't need to be public on the host.
 
Old 08-21-2016, 07:28 AM   #4
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,182
Blog Entries: 10

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
I shared out /home/jj/Documents and here's what to expect.
Attached Thumbnails
Click image for larger version

Name:	Shutter_006.jpg
Views:	3
Size:	89.8 KB
ID:	22810   Click image for larger version

Name:	Shutter_007.jpg
Views:	3
Size:	137.0 KB
ID:	22811  
 
Old 08-21-2016, 10:15 AM   #5
iFunction
Member
 
Registered: Nov 2015
Posts: 189

Original Poster
Rep: Reputation: Disabled
@frankbell - yes your assumption is correct, I simply wanted to get a python script I was working on onto the Virtual Machine.

@AwesomeMachine - Not quite, this was where I was getting confused, it actually shows up as a mounted disk but initially only if logged in as root. If logged in as a user or even an admin, it's not there to be seen by a newbie such as myself. Eventually, I logged in as root simply because I was tired of typing sudo and then my password to do anything to find this, and there is was sitting on the desktop as a mounted external drive. I was unable to change the permissions by just chmod though which confused me. I have since found out that this is a security thing and that a better way instead of just opening up the folder or drive to everyone, is to add the user to the group using:
Code:
sudo usermod -a -G groupname username

# use this to find the username as that can often be an anomaly for a newbie
ls -l
I'm sure you guys are aware of this, but I like to clarify posts in the event that someone else finds it when they are stuck

Thank you for your help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual box share folder issue unclesamcrazy Linux - Newbie 8 07-05-2013 10:46 AM
how to share a folder for virtual linux server in windows xp jpmaxyusuf Linux - Server 3 07-20-2010 02:45 PM
unable to auto mount 'shared folder' iin Suse 11.2 virtual machine using Virtual Box marvinudy Linux - Virtualization and Cloud 1 02-03-2010 03:29 PM
how to accessing windows share folder from Linux Machine imughal Linux - Newbie 1 02-29-2008 02:49 AM
How to web share a folder on solaris machine kalpeshmahadik Solaris / OpenSolaris 3 04-27-2006 10:33 AM


All times are GMT -5. The time now is 08:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration