curl-users
RE: curl -T
Date: Tue, 1 May 2012 09:58:09 -0400
Replies inline, marked with RG>
-----Original Message-----
From: kalin m [mailto:kalin_at_el.net]
Sent: Monday, April 30, 2012 9:04 PM
To: curl-users_at_cool.haxx.se
Subject: curl -T
hi all..
i have been successfully using this for many years now:
curl -T some_file user:pass sftp://ftp.server.com/dir/
to transfer files.
RG> Shouldn't this be
RG>
RG> curl -T some_file -u user:pass sftp://ftp.server.com/dir/
RG> or
RG> curl -T some_file sftp://user:pass@ftp.server.com/dir/
RG>
RG> and same for your failing case?
RG>
recently i came across a situation where i get this:
# curl -vvvv -T some_file user:pass sftp://ftp.server.com/dir/
* About to connect() to ftp.server.com port 22 (#0)
* Trying 1.2.3.4... connected
* Connected to ftp.server.com (1.2.3.4) port 22 (#0)
* SSH authentication methods available: publickey,password
* Using ssh public key file /user/.ssh/id_dsa.pub
* Using ssh private key file /user/.ssh/id_dsa
* Initialized password authentication
* Authentication complete
* Could not open remote file for writing: Operation failed
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0* Closing connection #0
curl: (79) Could not open remote file for writing: Operation failed
_____________________________________________________________________
the thing is i can manually login and deposit the file by doing just:
# sftp user:pass_at_ftp.server.com ...
it can't be permissions since i get in with the same user manually.
right? the remote system is a windows one (not sure if that has any
importance). i talked to one of their admins (he said he has never heard
of curl ?!?) and he can see me when i login manually but there is no log
or any indication that curl is (successfully ?!) connecting as the -vvvv
states.
i've gotten the error "permission denied" before (when the thing was
really permissions - played with my sftp machines) but "Operation failed"
doesn't point to anything in particular.
any ideas?
thanks...
-------------------------------------------------------------------
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 2012-05-01