Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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!


Closed Thread
  Search this Thread
Old 04-08-2008, 11:58 PM   #1
Registered: Apr 2008
Posts: 47

Rep: Reputation: 15
share a windows folder in Linux

i want to copy some files from Linux folder to a folder in windows using scp command
but every time i try to execute scp command:
scp /root/common/sample.cpp 'user@'
it connects to the remote machine and doesnot allow to copy sample.cpp from Linux m/c to test folder on windows....
Please let me know how to share a windows folder or give read/write rights to a Linux user...
Old 04-09-2008, 01:58 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
Old 04-09-2008, 02:02 AM   #3
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 572

Rep: Reputation: 56
If /test on your Windows machine is shared, then mount it on the Linux machine - like mapping a Windows share to a drive letter like M:.

To do this, use a command like this:-
mount -t cifs -o credentials=/etc/samba/cred.txt //winPC/test /tmp/test
This command will mount the Windows share to /tmp/test on my Linux box. I can now copy files from the Linux filesystems to /tmp/test, which is really the Windows share. Make sure the directory /tmp/test exists before you perform the mount. Also, only root can perform the mount command.

The file /etc/samba/cred.txt contains authentication data for the winPC computer:-
Change "administrator" and "xxxxx" to whatever makes sense for your Windows share.

The mount command refers to //winPC/FaxReceived. These are the server and share names for your Windows PC and shared directory. Make sure that your Linux machine can resolve the name ("winPC" in my case) to an IP address. If you don't have winPC in your host table, then replace "winPC" with the IP address of the Windows PC.
Old 04-09-2008, 02:21 AM   #4
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Follow-ups to

Closed Thread

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
Share Linux Folder to Windows chuchsn Linux - Newbie 5 04-04-2008 09:24 AM
how to accessing windows share folder from Linux Machine imughal Linux - Newbie 1 02-29-2008 02:49 AM
share folder on Linux to Windows ashley75 Linux - General 3 06-10-2005 05:12 PM
writing windows share folder boToo Linux - Newbie 2 06-09-2005 11:30 AM
creating a share folder and open it with windows me dhorn Linux - Networking 1 01-17-2004 10:25 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:53 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