I am at my wit's end. I have rsync going over SSH using cwRsync 2.0.3 and each time I run the batch file to pull the data down, I get the @ERROR: chdir failed error message. I have made sure that the nontsec variable is set in the Environment Variables under Advanced in the System control panel, have rebooted the service multiple times, ran the directory prep tool, and I'm using the Secure Channel Wrapper.
Server Config:
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
path = "/cygdrive/d/Some/Dir/"
read only = false
transfer logging = yes
path = "/cygdrive/c/Test/"
read only = false
transfer logging = yes
Client Script
SET SECHAW_IDENTITY="C:\server"
SET SECHAW_TYPE=ssh
SET SECHAW_LOCALPORT=9119
SET SECHAW_SERVER=server
SET SECHAW_SERVERPORT=873
SET SECHAW_USER=SvcwRsync
SET SECHAW_CMD="C:\Program Files\cwRsync\bin\rsync.exe" -avrn server.domain.com::Test "/cygdrive/d/Test/"
SET SECHAW_TUNNEL=ssh -i "C:\server" -L 9119:127.0.0.1:873 SvcwRsync@server -T -N
"C:\Program Files\cwRsync\bin\sechaw.exe" --verbose
Any ideas? Please forgive any brevity.
Thanks for the response. I tried your updated batch file and still a no-go with the same error. FYI- I used my original batch file with a different server and it worked perfectly. Is there something on the server I should focus on?
Jeff
It seems that rsync command at your client side is not set up properly. Try batch file below:
@ECHO OFF
SET SECHAW_IDENTITY="C:\server"
SET SECHAW_TYPE=ssh
SET SECHAW_LOCALPORT=9119
SET SECHAW_SERVER=server.domain.com
SET SECHAW_SERVERPORT=873
SET SECHAW_USER=SvcwRsync
SET SECHAW_CMD="C:\Program Files\cwRsync\bin\rsync.exe" -avn rsync://SvcwRsync@localhost:9119/Test "/cygdrive/d/test/"
SET SECHAW_TUNNEL=ssh -i "C:\server" -L 9119:127.0.0.1:873 SvcwRsync@server.domain.com -T -N
"C:\Program Files\cwRsync\bin\sechaw.exe" --verbose
Batch file above is generated by Secure Channel Wizard with following parameters:
secure channel type - ssh, private key - c:\server, local port - 9119, cwrsyncserver name - server.domain.com, server port - 873, your rsync command - -avn server.domain.com::Test "/cygdrive/d/test/"
Thanks for the response. I tried your updated batch file and still a no-go with the same error. FYI- I used my original batch file with a different server and it worked perfectly. Is there something on the server I should focus on?
Jeff
Can you give some information about your servers ? OS ? rsync version ? openssh version ?
Can you give some information about your servers ? OS ? rsync version ? openssh version ?
Windows Server Standard 2003 with SP1. Using cwRsync 2.0.3 and the bundled OpenSSH that came with it.
Can you give some information about your servers ? OS ? rsync version ? openssh version ?
Sorry I posted the last without logging in. Yes, we're using Server Standard 2003 with SP1, cwRsync 2.0.3 and the bundled OpenSSH server that came with. We are enforcing IPSec rules, but even with it turned off it still does not work. McAfee VirusScan Enterprise 8 is running also.
This problem is related to permissions. Does service account svcwRsync have read permissions on c:\test and underlying directories ?
This problem is related to permissions. Does service account svcwRsync have read permissions on c:\test and underlying directories ?
I just added that permission and still a no-go. I'm pondering here two possible reasons:
I digress... any other ideas?
Sincerely,
Hopeless in Los Angeles.
Every implementation has its own limitations :-) You may get some more explanations if you increase output verbosity from rsync and drop -T -N from ssh:
Every implementation has its own limitations :-) You may get some more explanations if you increase output verbosity from rsync and drop -T -N from ssh:
I'll give it a shot and let you know.
Every implementation has its own limitations :-) You may get some more explanations if you increase output verbosity from rsync and drop -T -N from ssh:
I ran the batch as you said, and it didn't give anything more on the error itself. Rsync did provide me with some other cool info, but nothing on the error. Has anyone done Rsync on a non-AD server? I may just go ahead and load AD on it since it is only being used as a web server.
Every implementation has its own limitations :-) You may get some more explanations if you increase output verbosity from rsync and drop -T -N from ssh:
Tunnel: ssh
Command to run: "C:\Program Files\cwRsync\bin\rsync.exe" -avrnvv rsync://SvcwRsy
nc@localhost:9119/test "/cygdrive/d/test/"
Tunnel command: ssh -i "C:\claudius" -L 9119:127.0.0.1:873 SvcwRsync@server.domain.com
Establishing secure channel ...
opening tcp connection to localhost port 9119
Last login: Fri Sep 9 16:23:47 2005 from adsl-000-000-000-000.dsl.irvnca.pacbell
.net
opening connection using --server --sender -vvvnlogDtpr . test
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1171)
_exit_cleanup(code=5, file=main.c, line=1171): about to call exit(5)
Terminating secure channel ...
Still nothing. I loaded AD on the box and reinstalled Rsync. I even made the owner of the folder SvcwRsync and each subcontainer.
Even more hopeless..
Tunnel: ssh
Command to run: "C:\Program Files\cwRsync\bin\rsync.exe" -avrnvv rsync://SvcwRsy
nc@localhost:9119/test "/cygdrive/d/test/"
Tunnel command: ssh -i "C:\claudius" -L 9119:127.0.0.1:873 SvcwRsync@server.domain.com
Establishing secure channel ...
opening tcp connection to localhost port 9119
Last login: Fri Sep 9 16:23:47 2005 from adsl-000-000-000-000.dsl.irvnca.pacbell
.net
opening connection using --server --sender -vvvnlogDtpr . test
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1171)
_exit_cleanup(code=5, file=main.c, line=1171): about to call exit(5)
Terminating secure channel ...
Still nothing. I loaded AD on the box and reinstalled Rsync. I even made the owner of the folder SvcwRsync and each subcontainer.
Even more hopeless..
Okay. I tried reversing the situation by making the server the client, and the client as the server. We got the same error. Then I did something absolutely extraordinary and looked at the log for the first time.... the first place I should have looked.
2005/09/12 15:34:29 rsync: chdir "/cygdrive/C/Backed Up/Directory/" failed
: No such file or directory (2)
So I changed the location of the share in rsyncd.conf to just Directory to store it in the cwRsync folder in Program Files. Everything worked. Is there a DLL not being registered that's keeping the path "/cygdrive/c/Backed Up/Directory/" from registering?
Tunnel: ssh
Command to run: "C:\Program Files\cwRsync\bin\rsync.exe" -avrnvv rsync://SvcwRsy
nc@localhost:9119/test "/cygdrive/d/test/"
Tunnel command: ssh -i "C:\claudius" -L 9119:127.0.0.1:873 SvcwRsync@server.domain.com
Establishing secure channel ...
opening tcp connection to localhost port 9119
Last login: Fri Sep 9 16:23:47 2005 from adsl-000-000-000-000.dsl.irvnca.pacbell
.net
opening connection using --server --sender -vvvnlogDtpr . test
@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1171)
_exit_cleanup(code=5, file=main.c, line=1171): about to call exit(5)
Terminating secure channel ...
Still nothing. I loaded AD on the box and reinstalled Rsync. I even made the owner of the folder SvcwRsync and each subcontainer.
Even more hopeless..
Okay. I tried reversing the situation by making the server the client, and the client as the server. We got the same error. Then I did something absolutely extraordinary and looked at the log for the first time.... the first place I should have looked.
2005/09/12 15:34:29 rsync: chdir "/cygdrive/C/Backed Up/Directory/" failed
: No such file or directory (2)
So I changed the location of the share in rsyncd.conf to just Directory to store it in the cwRsync folder in Program Files. Everything worked. Is there a DLL not being registered that's keeping the path "/cygdrive/c/Backed Up/Directory/" from registering?
After all this time, I figured it out. I was using quotes to define the directories of the share names in my rsyncd.conf. I knew it was something stupid I was doing because Rsync is a very solid, robust app. All is working beautifully. Thanks for your help, Tev.
Jeff Buccola
Just to add this already wonderful thread, I had the dreaded chdir error as well. I fixed it by changing the variable /cygwin to /cygdrive in the rsyncd.conf file on the server end.
Server: Microsoft Windows Server 2003
Client: Windows XP Professional SP2
Software: cwRsyncServer 2.0.10 with OpenSSL and cwRsync 2.0.10