Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
$ curl -T "index.html" -k --ftp-ssl -u "MYUSER@MYDOMAIN.COM" MYDOMAIN.COM
Enter host password for user 'MYUSER@MYDOMAIN.COM':


 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0 57173    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method PUT is not allowed for the URL /index.html.</p>
<hr>
<address>Apache/2.2.16 Server at MYDOMAIN.COM Port 80</address>
</body></html>
100 57480  100   307  100 57173    284  52902  0:00:01  0:00:01 --:--:-- 53633

Also posted on Stack Overflow

share|improve this question
2  
Cross-posting is a no-no. –  John T Jan 11 '11 at 9:58

2 Answers 2

The problem is not @ (you don't need to escape it), it's that you haven't told curl to use FTP in the first place. Note that you're receiving a HTTP response from a HTTP server.

cURL takes URLs, and if it encounters a bare mydomain.com it adds http:// automatically. Use curl ... ftps://mydomain.com (which enables --ftp-ssl automatically, by the way).

share|improve this answer
up vote 1 down vote accepted

i sniffed it with wireshark:

curl --ftp-ssl -T "FILE.TXT" -k -u "MYUSER@MYDOMAIN.COM:MYPASSWORD" "ftp://MYDOMAIN.COM"

and this one uses ftps! :P it works perfectly! solved :)

thank you!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.