LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-14-2015, 10:19 PM   #1
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 64

Rep: Reputation: Disabled
Attempting to get rsync with ssh to work from cygwin client to Linux server


I am attempting to get rsync with ssh to work for transferring files from a cygwin (windows 7) client to a Linux (slackware) server. I have a straight rsync (without ssh) working fine. I am attempting to use ssh with rsync because I read somewhere on the internet that the cygwin etc/fstab file with "noacl"
Code:
none /cygdrive cygdrive user,noacl,posix=0 0 0
only works with ssh and that the noacl part of the statement will get rid of all of the permission denied errors. And I do want to get rid of the rsync permission denied errors on the backup. I am starting a
Code:
rsync --daemon
on my Linux machine and I am using the following command on cygwin
Code:
c:\cygwin64\bin\rsync -vvv -e "/usr/bin/ssh" --groupmap -vvrtlz --log-file=/backup.log --password-file=/secret /cygdrive/c/Users lin@192.168.0.9::LinsLaptop
I have made various small variations on this command and got various different errors from rsync. At the moment the error that I am getting is that rsync cannot set the group ( I can't remember the exact wording of the error message).

EDIT: The error message is
Code:
2015/09/15 12:42:42 [8132] @ERROR: setgid failed
2015/09/15 12:42:42 [8132] rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1]
2015/09/15 12:42:42 [8132] [sender] _exit_cleanup(code=5, file=main.c, line=1635): about to call exit(5)
However, the rsync process does create all of the Windows directories in the linux server backup directory before it fails, but they are all empty.

On cygwin the group is None (513 I think) I have tried setting it to Users (545 I think) to match the group of the user on the linux machine in /etc/passwd in cygwin but this did'nt work so I set it back. My rsyncd.conf and rsyncd.secrets files are in the users directory on the linux server and the secrets file has the correct permissions (600). Here is the contents of my rsyncd.conf file
Code:
lin@darkstar:/home/lin$ cat rsyncd.conf
   pid file = /var/run/rsyncd.pid
   lock file = /var/run/rsync.lock
   log file = /var/log/rsyncd.log
   strict modes = false

[OldLaptop]

    path = /LindasBackups/Old_Laptop_Backup
    comment = Lin's Backup area (requires authentication)
    use chroot = false
    uid = lin
    gid = users
    read only = false
    auth users = lin
    log file = /LindasBackups/Old_Laptop_Backup.log
    secrets file = /etc/rsyncd.secrets 

[LinsLaptop]

    path = /LindasBackups/Backup-2015-09-14
    comment = Lin's Backup area (requires authentication)
    use chroot = false
    munge symlinks = false
    uid = lin
    gid = users
    read only = false
    auth users = lin
    log file = /LindasBackups/LinsLaptop_Backup.log
    secrets file = /home/lin/rsyncd.secrets 

lin@darkstar:/home/lin$
I think that I have ssh set up O.K. because I can connect (without a password using keys) from the cygwin client to the Linux server O.K. I tried to set up
Code:
ssh-host-config -y
on the cygwin client and that created a new privileged user but that seemed to create other problems elsewhere so I deleted that user from windows.

I am hoping that someone here can give me a detailed explanation of how to set up rsync with ssh because all of the posts that I have read on the internet on this subject seem very complicated. Especially a YouTube video called "rsync + ssh + cygwin - full and TOTAL instructions - Windows 2008 R2" that I thought would explain it well (or at least well enough for me to adapt it to windows 7).

Thank you for your time and if you need any further information I will be happy to supply it.

Last edited by vovim; 09-15-2015 at 07:05 AM. Reason: Found the error message
 
Old 09-15-2015, 02:31 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Have you looked at SSH and Rsync within Cygwin?
Looks straight forward to me.

Not sure you need the quotes around /usr/bin/ssh.
 
Old 09-16-2015, 07:29 AM   #3
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 64

Original Poster
Rep: Reputation: Disabled
Thanks lazydog. No, I hadn't seen that page. And you are right it does look quite simple in that one. I am a bit busy with other things at the moment so I will give it a try at the weekend.
 
Old 09-23-2015, 08:06 AM   #4
vovim
Member
 
Registered: Nov 2011
Location: England
Distribution: Slackware64 current and Slackware arm current
Posts: 64

Original Poster
Rep: Reputation: Disabled
lazydog, I have tried that now and it works. Thanks for your help. I'll mark this as solved.
 
Old 09-23-2015, 10:18 AM   #5
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Glad to help.
 
  


Reply

Tags
cygwin, rsync+ssh, slackware 14.1, windows 7



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
Rsync/SSH from Windows to Linux Server -- Portable novabrahm Linux - Software 1 08-19-2012 07:17 PM
[SOLVED] scp/ssh to cygwin server from linux server without password prompt... blainemiller Linux - Server 7 05-18-2011 02:04 PM
SSH to work without a password between CentOS & Cygwin timmywo Linux - Server 9 08-08-2010 03:26 AM
Rsync server vs rsync over ssh humbletech99 Linux - Networking 1 10-18-2006 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:29 PM.

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
Open Source Consulting | Domain Registration