Get "Couldn't canonicalise" error using sftp and DOS target path, but source path (& scp) is okay.‏

Rick Patterson rick.patterson@hotmail.com
Mon Dec 10 19:42:00 GMT 2012


Hello. When trying to sftp a file from one Cygwin machine to another via
 sftp, I get "Couldn't canonicalise: No such file or directory." on a 
target directory in DOS format, unless I specify a cygdrive target 
path.  I do not get this error on the source directory, even though it 
is also in DOS format.  

"builda" machine
C:\>uname -a
CYGWIN_NT-6.0 BUILDA 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin

build b machine:
C:\>ssh BUILDB "uname -a"
CYGWIN_NT-6.0-WOW64  BUILDB 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

I use the following sftp script "buildb.sftp"

cd d:/cygwin_main/winx64h
pwd
lcd E:/cygwin_main/win32
lpwd
put testfile.txt
bye

I get the following error sftping to "buildb" machine:
sftp -b buildb.sftp buildb
sftp> d:/cygwin_main/winx64h
Couldn't canonicalise: No such file or directory.

I
 find I have to replace the target specification "cd 
d:/cygwin_main/winx64h" line in the sftp batch file with the "cygdrive" 
version, i.e. 'cd /cygdrive/d/cygwin_main/winx64h".  However, this means
 that I would have to know in advance that the target machine is a 
cygwin machine, and I should not have to know this, as we have some 
machines with sftp clients that are not Cygwin.  Also, only the target 
directory specification is affected: after changing the target 
specification in the example above to cygdrive format, then the sftp 
script works -  I do not have to change the  source directory 
"E:/cygwin_main/win32" to cygdrive format.   I am also able to scp the 
file fine (using cygwin scp), and a DOS-format target specification.   
But we would prefer to use the batch file capabilities of sftp.

Rick 		 	   		  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 19954 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20121210/017ab424/attachment.obj>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list