cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: curl: (79) scp: /test.txt: No such file or directory

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Tue, 29 Jun 2010 12:20:17 -0600

At 19:50 +0200 6/29/10, Daniel Stenberg wrote:
>However, the code within libcurl that does the ~ expansion is different for SCP and SFTP although it isn't at all clear to me WHY this is the case. If you (can) build your own curl from source, it would be fun to see if you can modify lib/ssh.c:ssh_getworkingpath() to use the SFTP approach even for SCP to check if that makes it work for you.

Please remember that the tilde character IS legitimate in (or as) a file name. I think, but can't prove, that the tilde convention for one's home directory is supposed to be supported only by shells. Quoting is pretty much expected to be painful in shells but it ought not to be in tools like curl.

At 11:49 -0400 6/29/10, Sharma, Meghnath wrote, and I snipped:
>Following log shows the usage of SCP
>$ curl -v -u sharmam:qwer5678 -T testt.txt scp://dicmdb01/~/
SNIP
>curl: (79) scp: ~/testt.txt: No such file or directory

It looks as though the original request was made while in the $HOME directory and the tilde got added in by curl or someone else, perhaps an error line formatter trying to be helpful.

-- 
--> If  it's not  on  fire  it's  a  software  problem. <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-29