I am using lftp to upload files to my webserver using webdav authentication. The webserver is set up to deny directory listing of the target directory. lftp 3.5.4 seems to be failing to authenticate. This didn't happen with lftp 3.0.13. Could someone please decipher the following for me and let me know how to fix it?

Thanks,

--Yan

poseidon:/home/nfs/yan# lftp -d -e "put -O/blog/Travels/images x.jpg ; exit" -u user,pass http://www.seiner.com/blog/Travels/images
---- Connecting to www.seiner.com (192.168.128.2) port 80
---- Sending request...
---> HEAD /blog/Travels/images HTTP/1.1
---> Host: www.seiner.com
---> User-Agent: lftp/3.5.4
---> Accept: */*
---> Authorization: Basic d2ViZGF2OlN1bk1vb24=
---> Connection: keep-alive
--->
<--- HTTP/1.1 301 Moved Permanently
<--- Date: Wed, 06 Sep 2006 13:45:15 GMT
<--- Server: Apache/2.0.51 (Fedora)
<--- Location: http://www.seiner.com/blog/Travels/images/
<--- Keep-Alive: timeout=15, max=100
<--- Connection: Keep-Alive
<--- Content-Type: text/html; charset=iso-8859-1
<--- X-Pad: avoid browser bug
<---
cd: received redirection to `http://www.seiner.com/blog/Travels/images/'
---- Connecting to www.seiner.com (192.168.128.2) port 80
---- Sending request...
---> HEAD /blog/Travels/images/ HTTP/1.1
---> Host: www.seiner.com
---> User-Agent: lftp/3.5.4
---> Accept: */*
---> Connection: keep-alive
--->
<--- HTTP/1.1 302 Found
<--- Date: Wed, 06 Sep 2006 13:45:15 GMT
<--- Server: Apache/2.0.51 (Fedora)
<--- X-Powered-By: PHP/4.3.10
<--- Location: http://www.seiner.com/sys/error.php?error=403
<--- Keep-Alive: timeout=15, max=100
<--- Connection: Keep-Alive
<--- Content-Type: text/html; charset=ISO-8859-1
<---
cd: received redirection to `http://www.seiner.com/sys/error.php?error=403'
---- Closing HTTP connection
---- Connecting to www.seiner.com (192.168.128.2) port 80
---- Sending request...
---> HEAD /sys/error.php?error=403 HTTP/1.1
---> Host: www.seiner.com
---> User-Agent: lftp/3.5.4
---> Accept: */*
---> Connection: keep-alive
--->
<--- HTTP/1.1 200 OK
<--- Date: Wed, 06 Sep 2006 13:45:15 GMT
<--- Server: Apache/2.0.51 (Fedora)
<--- X-Powered-By: PHP/4.3.10
<--- X-Pingback: http://www.seiner.com/blog/Travels/xmlrpc.php
<--- Keep-Alive: timeout=15, max=100
<--- Connection: Keep-Alive
<--- Content-Type: text/html; charset=utf-8
<---
cd ok, cwd=/sys/error.php?error=403
---- Sending request...
---> PUT /blog/Travels/images/x.jpg HTTP/1.1
---> Host: www.seiner.com
---> User-Agent: lftp/3.5.4
---> Accept: */*
---> Content-length: 416895
---> Last-Modified: Sat,  7 May 2005 15:13:18 GMT
---> Connection: close
--->
<--- HTTP/1.1 401 Authorization Required
<--- Date: Wed, 06 Sep 2006 13:45:15 GMT
<--- Server: Apache/2.0.51 (Fedora)
<--- WWW-Authenticate: Basic realm="WebDAV Restricted"
<--- X-Powered-By: PHP/4.3.10
<--- X-Pingback: http://www.seiner.com/blog/Travels/xmlrpc.php
<--- Content-Length: 3477
<--- Connection: close
<--- Content-Type: text/html; charset=utf-8
<---
---- Closing HTTP connection
put: Access failed: 401 Authorization Required (/blog/Travels/images/x.jpg)
---- Closing HTTP connection

======================

on the server end:

192.168.128.202 - - [06/Sep/2006:06:45:15 -0700] "HEAD /blog/Travels/images HTTP/1.1" 301 - "-" "lftp/3.5.4" 192.168.128.202 - - [06/Sep/2006:06:45:15 -0700] "HEAD /blog/Travels/images/ HTTP/1.1" 302 - "-" "lftp/3.5.4" 192.168.128.202 - - [06/Sep/2006:06:45:15 -0700] "HEAD /sys/error.php?error=403 HTTP/1.1" 200 - "-" "lftp/3.5.4" 192.168.128.202 - - [06/Sep/2006:06:45:15 -0700] "PUT /blog/Travels/images/x.jpg HTTP/1.1" 401 3477 "-" "lftp/3.5.4"

Reply via email to