Share files/folders from Windows to Linux on VMWare

This post is for our Online Apps DBA trainees trying to install Oracle Application on Virtual Linux machine.

If you install Linux O.S. as (Guest Operating System) on top of your existing windows machine using VMware virtual Server check here, Next step is to copy R12/11i/oracle software from windows machine to VMware Linux O.S.

Steps mentioned below are to share folder on Windows (host o.s.) and access it from Linux (guest o.s.)

 A. Share folder on Windows Machine 
1. Check your windows Workgroup name >> Right click on My Computer and click on Properties

2. Click on Computer Name tab and check Workgroup Name

3. Next step is to share folder on windows machine

Right click on Folder which you wish to share and access from Linux Machine and click on Properties

4. Click on Sharing taband select Share this folder on the network

.

B. Changes on Linux Virtual Machine (Guest Operating System)

1. During Linux installation, select Customize software packages to be installed

2. Click on Details against Server Configuration Tools

3. Select system-config-sambaSamba Server Configuration Tool

If you don’t want to select Samba Server specifically, then select everything
3.  select Everything from package list

After Linux installation, modify samba server configuration

Open /etc/samba/smb.conf and make following changes

1. workgroup = [change it to your windows workgroup] like

workgroup = WORKGROUP

.

2. server string = Samba Server [name] like

server string = Samba Server myLinux Server

3. Uncomment entry like hosts  allow  = [windows IP address]

to check your windows machine use “ipconfig

hosts allow = [your windows IP address here]

like
hosts allow = 192.168.1.2   (Please change above IP to your windows IP)

4. uncomment these two lines by removing ; (semicolon) from below two lines

encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

5. At end of file uncomment following files

[myshare] comment = My Linux share                
path = /BI
valid users = oracle
public = no
writable = no
printable = no
create mask = 0765

Here “path = /BI” is windows share name and “valid users= oracle” is user on windows machine.
6. Restart samba server using

/etc/init.d/service smb stop
/etc/init.d/service smb start

7. Create directory on Linux to view windows shared folder
mkdir -p /stage/WinServer

8. Mount Windows share foler on linux using
mount -t smbfs -o username=atul, password=[password] //192.168.1.2/BI /stage/WinServer

above password is windows machine password for user atul (replace your windows username and password)
192.168.1.2 is IP address of windows machine ( Change 192.168.1.2 to your windows IP address and Verify that you can ping windows IP from Linux machine)
BI is shared folder name on windows
and /stage/WinServer is folder name on Linux

9. Access windows share on linux using

cd /stageWinServer
ls

.

Reference

Share This Post with Your Friends over Social Media!

About the Author Neha Mittal

Leave a Comment:

14 comments
neerajblr says September 7, 2008

Hi,

Folders in Windows can be shared with VMWorktation through Shared Folders in VM Settings too and that is more easier and simpler.
Do let me know if you want to know more on the same.

Thanks
Neeraj Kataria

Reply
Atul says September 8, 2008

Thanks Neeraj, Is shared folder feature available in Vmware server as well (not workstation) ?

Reply
hussain says September 8, 2008

Good one, Thanks for the post.

Regards,
Hussain

Reply
Ravi says October 1, 2008

Hello ,

This is really helpul and now I am able to map my window shared folder to Linux using shamba server.

But I am not able to wirte any thing on the mounted point on linux.

i.e I mounted /// on /stage/WinServer but not able to copy any file in /stage/WinServer directory on linux.

It gives Permisson denyed can’t write

even if I tried the stub with root user It is giving me the same problem.

Please suggest

Reply
Tang Hai Anh says October 9, 2008

Hi,

Firstly, I’m thanks u for your posted.

But I am not able to map my window shared folder to Linux using shamba server.

My config:
in /etc/samba/smb.conf:

workgroup = WORKGROUP
server string = Samba Server myLinux Server
hosts allow = 10.0.0.7
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

[myshare]
comment = My Linux share
path = /Temp
valid users = administrator
public = no
writable = yes
printable = no
create mask = 0765

**reset samba**

I created folder shared on /mnt
then I mounted but it not work:

mount -t smbfs -o username=administrator, password=********* //10.0.0.7/Temp /mnt/shared

But it not work

Temp folder shared and dir on: D:/ (ON WINDOWS XP)
Plz help me. I’m beginner on using Linux

Reply
Atul says October 10, 2008

@ Tang,
What error message you are getting ?

Can you ping windows ip from linux (virtual) machine ?

Is your requirement is just to copy few files/folder from windows to linux virtual o.s. ?

Reply
Tang Hai Anh says October 11, 2008

Dear Atul,

This’s my sreenshot:

http://code-now.com/temp/screenshot/screenshot01.JPG
http://code-now.com/temp/screenshot/screenshot02.JPG

I need map my windows shared folder to Linux to complie something (using gcc). I don’t want use cygwin.

Reply
Atul says October 11, 2008

Tang,
Firstly remove space between , and password Use like

mount -t smbfs -o username=administrator,password=********* //10.0.0.7/Temp /mnt/shared

Next is that there is space in your username so you might have to quotes (first try without quotes)

Reply
Tang Hai Anh says October 11, 2008

Hi Atul!

Now I am able to map my window shared folder to Linux. Thank u so much!

Have a nice weekend!

Reply
subhadeep says December 7, 2008

Thanks,
It helped me a lot

Reply
Mohammed Amer Ali says January 1, 2009

Dear

Great effort

Reply
Abhishek says February 27, 2010

Hi

i have windowsXp as (host machine) and Linux as(virtual machine).
I am not able to ping the windows ip but i can ping to vmnet1 but from windows i can ping linux machine ip.
Can u help me regarding this problem.

Thanks
Abhishek

Reply
A says August 8, 2010

Guys – Here it is simple was to share you shared directories in vm machines. I did for linux machine.

Host : Vista
Guest :OEL

Had to spend little time in figuring out where as the direcotry appers on VM.
on Linux VM /mnt/hgfs/stage
Refernce
http://www.vmware.com/support/ws5/doc/ws_running_shared_folders.html
You can share the host OS folders with multiple VM machines.

Thanks,

Reply
amar singh says November 6, 2012

good one.i got somuch of information about sharing
a folder between windows and guest linux

thanks

Reply
Add Your Reply

[i]
[i]
[i]
[i]
[index]
[index]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[index]
[index]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]
[523.251,1046.50]