Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-20-2016, 05:14 PM   #1
Registered: Nov 2015
Posts: 224

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, 08:07 PM   #2
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,513
Blog Entries: 16

Rep: Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212Reputation: 3212
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 08:11 PM.
Old 08-20-2016, 08:10 PM   #3
Senior Member
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,013

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
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, 06:28 AM   #4
LQ Addict
Registered: Jan 2011
Posts: 8,563
Blog Entries: 13

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

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

Name:	Shutter_007.jpg
Views:	5
Size:	137.0 KB
ID:	22811  
Old 08-21-2016, 09:15 AM   #5
Registered: Nov 2015
Posts: 224

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:
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


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 09:46 AM
how to share a folder for virtual linux server in windows xp jpmaxyusuf Linux - Server 3 07-20-2010 01: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 02:29 PM
how to accessing windows share folder from Linux Machine imughal Linux - Newbie 1 02-29-2008 01:49 AM
How to web share a folder on solaris machine kalpeshmahadik Solaris / OpenSolaris 3 04-27-2006 09:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:06 PM.

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