lftp icon indicating copy to clipboard operation
lftp copied to clipboard

v4.6.1: ls shows no results on owncloud (Webdav)

Open vDorst opened this issue 9 years ago • 21 comments

I was trying to sync my local directory with remote webdav directory. But the sync tries always to upload the same file.

Mirror Command.

/usr/bin/lftp -e "mirror --log=/media/Backup/lftp.log -R -r -p -O backup-host-ipa /media/Backup/backup-host-ipa" -u thirsty:<passwd> https://<owncloud-host>/remote.php/webdav/

So I tried to get a file files on the server. But no results. Log of the 'ls' command.

[root@ipa rra]# /usr/bin/lftp -u thirsty:<password> https://<owncloud-host>/remote.php/webdav/backup-host-ipa/ -d
---- Connecting to <owncloud-host> (2a01:7c8:ab00:d4:f::1) port 443
---- Sending request...
---> PROPFIND /remote.php/webdav/backup-host-ipa/ HTTP/1.1
---> Host: <owncloud-host>
---> User-Agent: lftp/4.6.1
---> Accept: */*
---> Depth: 0
---> Content-Type: text/xml
---> Content-Length: 68
---> Authorization: Basic <secret>
---> Connection: keep-alive
--->
---> <?xml version="1.0" ?><propfind xmlns="DAV:"><allprop/></propfind>
Certificate: OU=Domain Control Validated,OU=PositiveSSL Wildcard,CN=*.stackstorage.com
 Issued by:        C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
 Checking against: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
  Trusted
Certificate: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Domain Validation Secure Server CA
 Issued by:        C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Certification Authority
 Checking against: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Certification Authority
  Trusted
Certificate: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO RSA Certification Authority
 Issued by: C=SE,O=AddTrust AB,OU=AddTrust External TTP Network,CN=AddTrust External CA Root
  Trusted
<--- HTTP/1.1 207 Multi-Status
<--- Date: Mon, 18 Jan 2016 18:38:20 GMT
<--- Server: Apache
<--- Vary: Brief,Prefer
<--- Set-Cookie: <cut>
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
<--- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
<--- Pragma: no-cache
<--- Set-Cookie: <cut>
<--- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' https://stack-cdn.transip.nl; style-src 'self' 'unsafe-inline' https://stack-cdn.transip.nl; frame-src *; img-src *; font-src 'self' https://stack-cdn.transip.nl data:; media-src *; connect-src *
<--- Set-Cookie: <cut>
<--- DAV: 1, 3, extended-mkcol
<--- X-Content-Type-Options: nosniff
<--- X-XSS-Protection: 1; mode=block
<--- X-Robots-Tag: none
<--- X-Frame-Options: SAMEORIGIN
<--- Content-Length: 576
<--- Content-Type: application/xml; charset=utf-8
<--- Strict-Transport-Security: max-age=31536000
<---
---- Receiving body...
---- Received all
cd ok, cwd=/remote.php/webdav/backup-host-ipa
lftp thirsty@<owncloud-host>:/remote.php/webdav/backup-host-ipa> debug -c 9
lftp thirsty@<owncloud-host>:/remote.php/webdav/backup-host-ipa> set http:use-propfind on
lftp thirsty@<owncloud-host>:/remote.php/webdav/backup-host-ipa> ls
<owncloud-host> ---- Sending request...
<owncloud-host> ---> GET /remote.php/webdav/backup-host-ipa/ HTTP/1.1
<owncloud-host> ---> Host: <owncloud-host>
<owncloud-host> ---> User-Agent: lftp/4.6.1
<owncloud-host> ---> Accept: */*
<owncloud-host> ---> Authorization: Basic <secret>
<owncloud-host> ---> Connection: keep-alive
<owncloud-host> --->
<owncloud-host> <--- HTTP/1.1 200 OK
<owncloud-host> <--- Date: Mon, 18 Jan 2016 18:38:34 GMT
<owncloud-host> <--- Server: Apache
<owncloud-host> <--- Vary: Host
<owncloud-host> <--- Set-Cookie: <cut>
<owncloud-host> <--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
<owncloud-host> <--- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
<owncloud-host> <--- Pragma: no-cache
<owncloud-host> <--- Set-Cookie: <cut>
<owncloud-host> <--- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' https://stack-cdn.transip.nl; style-src 'self' 'unsafe-inline' https://stack-cdn.transip.nl; frame-src *; img-src *; font-src 'self' https://stack-cdn.transip.nl data:; media-src *; connect-src *
<owncloud-host> <--- Set-Cookie: <cut>
<owncloud-host> <--- X-Content-Type-Options: nosniff
<owncloud-host> <--- X-XSS-Protection: 1; mode=block
<owncloud-host> <--- X-Robots-Tag: none
<owncloud-host> <--- X-Frame-Options: SAMEORIGIN
<owncloud-host> <--- Content-Length: 110
<owncloud-host> <--- Content-Type: text/html; charset=UTF-8
<owncloud-host> <--- Strict-Transport-Security: max-age=31536000
<owncloud-host> <---
<owncloud-host> ---- Receiving body...
---- Received all
<owncloud-host> **** Peer closed connection
<owncloud-host> ---- Closing HTTP connection
lftp thirsty@<owncloud-host>:/remote.php/webdav/backup-host-ipa>

Changing set http:use-propfind makes no different.

OS: Fedora Server 23 x64 LFTP: Installed Packages Arch : x86_64 Epoch : 0 Version : 4.6.1 Release : 6.fc23

Webdav owncloud host: transip.nl (https://.stackstorage.com/status.php ) {"installed":true,"maintenance":false,"version":"8.2.1.4","versionstring":"8.2.1","edition":""}

vDorst avatar Jan 18 '16 19:01 vDorst

Also same issue with my own owncloud server.

---- Received all

<Here a long delay around 5 sec.>

**** Peer closed connection
---- Closing HTTP connection

My owncloud server

{"installed":true,"maintenance":false,"version":"8.2.2.2","versionstring":"8.2.2","edition":""}

vDorst avatar Jan 18 '16 19:01 vDorst

Found that http:use-propfind and http:use-allprop must be used in the rc file (unless you set them before authentication), other lftp keeps using GET.

Secondly debug output does not show xml body. I used tcpdump for that

Thirdly, it seems that 207 Multi-status confuses lftp:

lftp [email protected]:/remote.php/webdav/> cd Photos 
---- Connecting to host.owncube.com (94.23.12.164) port 80
---- Sending request...      
---> PROPFIND /remote.php/webdav/Photos HTTP/1.1
---> Host: host.owncube.com
---> User-Agent: lftp/4.6.0
---> Accept: */*
---> Depth: 0
---> Content-Type: text/xml
---> Content-Length: 68
---> Authorization: Basic YWRtaW46SFM3MjNqTzE=
---> Connection: keep-alive
---> 
---> <?xml version="1.0" ?><propfind xmlns="DAV:"><allprop/></propfind>
<--- HTTP/1.1 207 Multi-Status         
<--- Date: Tue, 16 Feb 2016 13:21:49 GMT
<--- Server: Apache
<--- X-Powered-By: PHP/5.5.29
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
<--- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
<--- Pragma: no-cache
<--- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
<--- Vary: Brief,Prefer
<--- DAV: 1, 3, extended-mkcol
<--- Set-Cookie: oc_sessionPassphrase=xxxx; path=/; httponly
<--- Set-Cookie: oc0oa3hkcazy=xxx; path=/; HttpOnly
<--- X-Content-Type-Options: nosniff
<--- X-XSS-Protection: 1; mode=block
<--- X-Robots-Tag: none
<--- X-Frame-Options: SAMEORIGIN
<--- Connection: close
<--- Transfer-Encoding: chunked
<--- Content-Type: application/xml; charset=utf-8
<--- 
---- Receiving body...
---- next chunk size: 565
---- next chunk size: 0
---- Received last chunk
<--- 
cd ok, cwd=/remote.php/webdav/

The (fragmented) body according to tcpdump is :

235
<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/remote.php/webdav/Photos/</d:href><d:propstat><d:prop><d:getlastmodified>Tue, 16 Feb 2016 12:44:37 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype><d:quota-used-bytes>5749393596</d:quota-used-bytes><d:quota-available-bytes>4985443428</d:quota-available-b
[fragmented here]
ytes><d:getetag>"56c319b57378c"</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>

lftp keeps staying inside /remote.php/webdav/ instead of changing directory, and ls/rels commands send GET and never list files.

drzraf avatar Feb 16 '16 13:02 drzraf

You can try f5c88ec77e20cfb5585027361e4f322c70048644 which outputs some more debug messages with "debug 10". It would be also helpful if you could provide me with a test account

lavv17 avatar Feb 19 '16 08:02 lavv17

It would be also helpful if you could provide me with a test account. test-case: owncube.com : 5 days of trial-mode.

drzraf avatar Feb 19 '16 12:02 drzraf

$ echo "debug 10; cd Photos;" | ./src/lftp -u admin http://xxx.owncube.com/remote.php/webdav/

---- dns cache hit                                                                 
---- attempt number 1 (max_retries=1000)
---- Connecting to xxx.owncube.com (94.23.12.164) port 80
---- Sending request...      
---> PROPFIND /remote.php/webdav/Photos HTTP/1.1
---> Host: xxx.owncube.com
---> User-Agent: lftp/4.6.4.80-ca712-dirty
---> Accept: */*
---> Depth: 0
---> Content-Type: text/xml
---> Content-Length: 68
---> Authorization: Basic xxxIjustchangedItxxx
---> Connection: keep-alive
---> 
---> <?xml version="1.0" ?><propfind xmlns="DAV:"><allprop/></propfind>
<--- HTTP/1.1 207 Multi-Status         
<--- Date: Fri, 19 Feb 2016 18:22:55 GMT
---- unhandled header line `Date'
<--- Server: Apache
---- unhandled header line `Server'
<--- X-Powered-By: PHP/5.5.29
---- unhandled header line `X-Powered-By'
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
---- unhandled header line `Expires'
<--- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
---- unhandled header line `Cache-Control'
<--- Pragma: no-cache
---- unhandled header line `Pragma'
<--- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
---- unhandled header line `Content-Security-Policy'
<--- Vary: Brief,Prefer
---- unhandled header line `Vary'
<--- DAV: 1, 3, extended-mkcol
---- unhandled header line `DAV'
<--- Set-Cookie: oc_sessionPassphrase=xxx; path=/; httponly
<--- Set-Cookie: oc0oa3hkcazy=xxx; path=/; HttpOnly
<--- X-Content-Type-Options: nosniff
---- unhandled header line `X-Content-Type-Options'
<--- X-XSS-Protection: 1; mode=block
---- unhandled header line `X-XSS-Protection'
<--- X-Robots-Tag: none
---- unhandled header line `X-Robots-Tag'
<--- X-Frame-Options: SAMEORIGIN
---- unhandled header line `X-Frame-Options'
<--- Connection: close
<--- Transfer-Encoding: chunked
<--- Content-Type: application/xml; charset=utf-8
<--- 
---- Receiving body...
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---- next chunk size: 565
---- next chunk size: 0
---- Received last chunk
<--- 
---- Closing HTTP connection

successive ls still show the content of ~ : the current directory wasn't changed to Photos/

drzraf avatar Feb 19 '16 18:02 drzraf

bb8bee9 should fix most of the problem. Maybe I also need to add trailing slash for directories.

lavv17 avatar Feb 20 '16 15:02 lavv17

confirmed! That's great!

drzraf avatar Feb 22 '16 13:02 drzraf

Since listing is now possible, see https://github.com/lavv17/lftp/issues/213 for a follow-up.

Adding a question: Is webdav implementation status documented somewhere (upload/download resume, chmod, link, mirror and exclude functionalities, ...) I guess lftp, for not using libneon, is probably not as webdav-complete than, say, cadaver. But lftp features like mirror & co are so much useful that it's really worth the price.

drzraf avatar Feb 22 '16 13:02 drzraf

Adding a question: Is webdav implementation status documented somewhere (upload/download resume, chmod, link, mirror and exclude functionalities, ...) I guess lftp, for not using libneon, is probably not as webdav-complete than, say, cadaver. But lftp features like mirror & co are so much useful that it's really worth the price.

drzraf avatar Feb 22 '16 13:02 drzraf

Another subtle and minor issue:

lftp [email protected]:/remote.php/webdav/Photos> ls ./
---- dns cache hit
---- attempt number 1 (max_retries=1000)
---- Connecting to xxx.owncube.com (94.23.12.164) port 80
---- Sending request...       
---> GET /remote.php/webdav/Photos/./ HTTP/1.1
---> Host: xxx.owncube.com
---> User-Agent: lftp/4.6.4.80-ca712-dirty
---> Accept: */*
---> Authorization: Basic xxx
---> Connection: keep-alive
---> 
<--- HTTP/1.1 400 Bad Request           
<--- Date: Mon, 22 Feb 2016 14:30:08 GMT
---- unhandled header line `Date'
<--- Server: Apache
---- unhandled header line `Server'
<--- X-Powered-By: PHP/5.5.29
---- unhandled header line `X-Powered-By'
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
---- unhandled header line `Expires'
<--- Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
---- unhandled header line `Cache-Control'
<--- Pragma: no-cache
---- unhandled header line `Pragma'
<--- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
---- unhandled header line `Content-Security-Policy'
<--- Set-Cookie: oc_sessionPassphrase=xxx; path=/; httponly
<--- Set-Cookie: oc0oa3hkcazy=xxx; path=/; HttpOnly
<--- X-Content-Type-Options: nosniff
---- unhandled header line `X-Content-Type-Options'
<--- X-XSS-Protection: 1; mode=block
---- unhandled header line `X-XSS-Protection'
<--- X-Robots-Tag: none
---- unhandled header line `X-Robots-Tag'
<--- X-Frame-Options: SAMEORIGIN
---- unhandled header line `X-Frame-Options'
<--- Connection: close
<--- Transfer-Encoding: chunked
<--- Content-Type: application/xml; charset=utf-8
<--- 
---- next chunk size: 364
<--*   OC\Connector\Sabre\Exception\InvalidPath
<--*   Dot files are not allowed
<--*   false
<--*   Dot files are not allowed
ls: ls ./: Operation not supported: 400 Bad Request (GET)

While in webdav, could GET /remote.php/webdav/Photos/./ be canonicalized as /remote.php/webdav/Photos/ (the issue being that in the ownCube/SabreDAV current implementation, successive listings of Photos/ will fail)

drzraf avatar Feb 22 '16 14:02 drzraf

Another one : ls Photos/2015-04/Foto0448.jpg -rw-r--r-- 560235 2016-02-15 10:49:22 .

The filename is shown as "."

drzraf avatar Feb 22 '16 14:02 drzraf

29e4fcc should fix the "./" problem (it includes 4de04c5fd8ef63006badcbc62a2c84ea5c188524 for other two minor display problems)

lavv17 avatar Feb 24 '16 11:02 lavv17

ls Photos/2015-04/Foto0448.jpg now shows the right filename cd Photos; ls ./ now list the directory

Good job!

drzraf avatar Feb 24 '16 14:02 drzraf

Thanks for testing!

lavv17 avatar Feb 25 '16 08:02 lavv17

ownCloud have changed its webdav implement. It does not work anymore.

drzraf avatar May 18 '19 02:05 drzraf

Please provide more details.

сб, 18 мая 2019, 5:17 Raphaël Droz [email protected]:

ownCloud have changed its webdav implement. It does not work anymore.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/205?email_source=notifications&email_token=AAHLWXHFVCOLIE3TTDGVLQDPV5RM7A5CNFSM4BY4UTIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWF22A#issuecomment-493641064, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHLWXHE3MJYA7WH6ZIZBF3PV5RM7ANCNFSM4BY4UTIA .

lavv17 avatar May 18 '19 03:05 lavv17

Please reopen, here are a couple of traces.

# ~/.lftprc
set cmd:save-cwd-history off
set cmd:save-rl-history off
set cmd:queue-parallel 0
set cmd:parallel 0
set cmd:remote-completion on
set color:use-color on
set ftp:list-options "-a"
set http:use-propfind on
set http:use-allprop on
# curl -X PROPFIND -v -u admin:xxx "https://xxx.owncube.com/remote.php/dav/files/admin/"
works

# lftp 4.8.4
# echo "debug 10; ls misc/" | lftp -u admin,xxx https://xxx.owncube.com/remote.php/dav/files/admin/
---- Sending request...                                                                      
---> GET /remote.php/dav/files/admin/misc/ HTTP/1.1
---> Host: xxx.owncube.com
---> User-Agent: lftp/4.8.4
---> Accept: */*
---> Authorization: Basic foobar
---> Connection: keep-alive
---> 
<--- HTTP/1.1 200 OK                       
<--- Date: Tue, 06 Oct 2020 00:36:52 GMT
---- unhandled header line `Date'
<--- Server: Apache
---- unhandled header line `Server'
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
---- unhandled header line `Expires'
<--- Cache-Control: no-store, no-cache, must-revalidate
---- unhandled header line `Cache-Control'
<--- Pragma: no-cache
---- unhandled header line `Pragma'
<--- X-XSS-Protection: 1; mode=block
---- unhandled header line `X-XSS-Protection'
<--- X-Content-Type-Options: nosniff
---- unhandled header line `X-Content-Type-Options'
<--- X-Frame-Options: SAMEORIGIN
---- unhandled header line `X-Frame-Options'
<--- X-Robots-Tag: none
---- unhandled header line `X-Robots-Tag'
<--- X-Download-Options: noopen
---- unhandled header line `X-Download-Options'
<--- X-Permitted-Cross-Domain-Policies: none
---- unhandled header line `X-Permitted-Cross-Domain-Policies'
<--- Content-Security-Policy: default-src 'none';
---- unhandled header line `Content-Security-Policy'
<--- Set-Cookie: oc_sessionPassphrase=xxx; path=/; secure; HttpOnly
<--- Set-Cookie: oc0oa3hkcazy=4bf99586e9400681885bb00b02d39b14; path=/; secure; HttpOnly
<--- Set-Cookie: cookie_test=test; expires=Tue, 06-Oct-2020 01:36:52 GMT; Max-Age=3600
<--- Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
---- unhandled header line `Strict-Transport-Security'
<--- Referrer-Policy: no-referrer
---- unhandled header line `Referrer-Policy'
<--- Keep-Alive: timeout=5, max=99
<--- Connection: Keep-Alive
<--- Transfer-Encoding: chunked
<--- Content-Type: text/html; charset=UTF-8
<--- 
---- Receiving body...
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---- next chunk size: 113
---- next chunk size: 0
---- Received last chunk
<--- 
copy: get hit eof
copy: waiting for put confirmation
copy: put confirmed store
copy: get is finished - all done
---- Closing HTTP connection

### packet received:
This is the WebDAV interface. It can only be accessed by WebDAV clients such as the ownCloud desktop sync client.



$ echo "debug 10; cd misc" | lftp -u admin,xxx https://xxx.owncube.com/remote.php/dav/files/admin/
---- Sending request...                                                                      
---> PROPFIND /remote.php/dav/files/admin/misc HTTP/1.1
---> Host: xxx.owncube.com
---> User-Agent: lftp/4.8.4
---> Accept: */*
---> Depth: 0
---> Content-Type: text/xml
---> Content-Length: 68
---> Authorization: Basic foobar
---> Connection: keep-alive
---> 
---> <?xml version="1.0" ?><propfind xmlns="DAV:"><allprop/></propfind>
<--- HTTP/1.1 207 Multi-Status       
<--- Date: Tue, 06 Oct 2020 00:40:11 GMT
---- unhandled header line `Date'
<--- Server: Apache
---- unhandled header line `Server'
<--- Expires: Thu, 19 Nov 1981 08:52:00 GMT
---- unhandled header line `Expires'
<--- Cache-Control: no-store, no-cache, must-revalidate
---- unhandled header line `Cache-Control'
<--- Pragma: no-cache
---- unhandled header line `Pragma'
<--- X-XSS-Protection: 1; mode=block
---- unhandled header line `X-XSS-Protection'
<--- X-Content-Type-Options: nosniff
---- unhandled header line `X-Content-Type-Options'
<--- X-Frame-Options: SAMEORIGIN
---- unhandled header line `X-Frame-Options'
<--- X-Robots-Tag: none
---- unhandled header line `X-Robots-Tag'
<--- X-Download-Options: noopen
---- unhandled header line `X-Download-Options'
<--- X-Permitted-Cross-Domain-Policies: none
---- unhandled header line `X-Permitted-Cross-Domain-Policies'
<--- Content-Security-Policy: default-src 'none';
---- unhandled header line `Content-Security-Policy'
<--- Vary: Brief,Prefer
---- unhandled header line `Vary'
<--- DAV: 1, 3, extended-mkcol, 2
---- unhandled header line `DAV'
<--- Set-Cookie: oc_sessionPassphrase=xxx; path=/; secure; HttpOnly
<--- Set-Cookie: oc0oa3hkcazy=1c7a7e0155f00eb7f89e2bee16241389; path=/; secure; HttpOnly
<--- Set-Cookie: cookie_test=test; expires=Tue, 06-Oct-2020 01:40:11 GMT; Max-Age=3600
<--- Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
---- unhandled header line `Strict-Transport-Security'
<--- Referrer-Policy: no-referrer
---- unhandled header line `Referrer-Policy'
<--- Keep-Alive: timeout=5, max=99
<--- Connection: Keep-Alive
<--- Transfer-Encoding: chunked
<--- Content-Type: application/xml; charset=utf-8
<--- 
---- accepting XML for PROPFIND...
---- Receiving body...
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
0:0 translated to pair 0:0 (0,0)
0 translated to pair 0:0 (0,0)
---- next chunk size: 564
---- next chunk size: 0
---- Received last chunk
<--- 
---- got EOF on PROPFIND reply
---- Closing HTTP connection

### packet received
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/admin/misc/</d:href>
    <d:propstat>
      <d:prop>
        <d:getlastmodified>Wed, 08 Nov 2017 06:02:48 GMT</d:getlastmodified>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <d:quota-used-bytes>517709872</d:quota-used-bytes>
        <d:quota-available-bytes>18642187054</d:quota-available-bytes>
        <d:getetag>"5a029e0930cb0"</d:getetag>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

Said simply, lftp is not issue PROPFIND anymore for ls commands. I tried http and https with the same results.

Note: could you, please, remove my quoted-email in your above comment? Note2: The day this service goes full-https, I'm not sure the strace trick will still be available. Any plan to add full-logging debug level showing packets too?

drzraf avatar Oct 06 '20 00:10 drzraf

I have the same problem, when using lftp_4.8.4-2build3_amd64.deb on Ubuntu to connect to ownCloud 10.1.1 (stable)

It also seems that everything takes place in the main directory, even if lftp tells me I have changed to a new directory. I can send a file, but it will go to the login directory

The example below shows that it seems I can move to an existing directory. But I can the remove the same directory after having seemingly moved to this directory

$ lftp -u some_login https://my.server/remote.php/dav/files/some_login/
Password:
cd ok, cwd=/remote.php/dav/files/some_login

lftp [email protected]:/remote.php/dav/files/some_login> cd Test_Dir
cd ok, cwd=/remote.php/dav/files/some_login/Test_Dir

lftp [email protected]:/remote.php/dav/files/some_login/Test_Dir> rmdir Test_Dir
rmdir ok, `Test_Dir' removed

lftp [email protected]:/remote.php/dav/files/some_login/Test_Dir> cd Test_Dir
cd: Access failed: 404 Not Found (/remote.php/dav/files/some_login/Test_Dir)

It's too bad I can't reliably use lftp to use a nice command-line interface to handle files on a remote server. This would be so convenient!

jypeter avatar Apr 21 '21 10:04 jypeter

I have resorted to using the seemingly dead and aptly named cadaver program, that seems to do the expected job!

It would be nice if lftp, that has more options, could work as well

$ cadaver https://my.host/remote.php/dav/files/my_login/

Authentication required for ownCloud on server `my.host':
Username: my_login
Password:

dav:/remote.php/dav/files/my_login/> cd check_plots_21-04-16
dav:/remote.php/dav/files/my_login/check_plots_21-04-16/> mget *
[Matching... 4 matches.]
Downloading `/remote.php/dav/files/my_login/check_plots_21-04-16/check_plot_21-04-16_tos_Omon_ann_04of04.png' to check_plot_21-04-16_tos_Omon_ann_04of04.png:
Progress: [=============================>] 100.0% of 999487 bytes succeeded.
Downloading `/remote.php/dav/files/my_login/check_plots_21-04-16/check_plot_21-04-16_tos_Omon_ann_03of04.png' to check_plot_21-04-16_tos_Omon_ann_03of04.png:
Progress: [=============================>] 100.0% of 868209 bytes succeeded.
Downloading `/remote.php/dav/files/my_login/check_plots_21-04-16/check_plot_21-04-16_tos_Omon_ann_02of04.png' to check_plot_21-04-16_tos_Omon_ann_02of04.png:
Progress: [=============================>] 100.0% of 1311407 bytes succeeded.
Downloading `/remote.php/dav/files/my_login/check_plots_21-04-16/check_plot_21-04-16_tos_Omon_ann_01of04.png' to check_plot_21-04-16_tos_Omon_ann_01of04.png:
Progress: [=============================>] 100.0% of 1444634 bytes succeeded.

jypeter avatar Apr 27 '21 08:04 jypeter

I remember having reported multiple issue about DAV some years ago, that @lavv17 diligently fixed and ownCloud were then usable back then. So these are likely regression. @jypeter : You'll find that rclone is also doing great job regarding DAV backends but I definitely miss lftp on these too.

drzraf avatar Apr 27 '21 13:04 drzraf

Thanks a lot @dzraf !

This looks indeed like a promising and active project! I will ask our sysadmins to have a look at it

jypeter avatar Apr 30 '21 08:04 jypeter