cURL / Mailing Lists / curl-library / Single Mail

curl-library

sftp uploads and relative paths

From: Nick Jensen <nickrjensen_at_gmail.com>
Date: Fri, 1 Jan 2010 20:31:42 -0500

Hello,

I am having an issue when trying to use relative upload paths with SFTP.

ftp://myhost.com:21/my-file.txt (works fine, uploads to the users home
directory)
sftp://myhost.com:22/my-file.txt (throws CURLE_REMOTE_ACCCESS_DENIED)

However...
sftp://myhost.com:22/~/my-file.txt (works as expected)

So I guess the solution is to use a ~ prefix ... but will this work on a
Windows based SFTP server? I was under the impression that the tilde was
only a valid path on Unix/Mac systems. Or is there another way to create a
cross-platform relative url?

(libcurl/7.19.7 OpenSSL/0.9.7l zlib/1.2.3 libssh2/1.2.1 on Mac OS X 10.5.8)

Nick

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-02