curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

SMB download from a windows 10 share not working

From: Alex Ditu via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 17 Dec 2019 12:43:32 +0200

I'm trying to use curl from a Linux machine to download a file from a SMB
share made on Windows 10, but it does not work (I've tested the share with
smbclient and it works fine). Also from a share made on a windows 7 machine
it works, so I believe it is related with the supported protocol versions,
but I did not find what's the maximum supported version. Below is the debug
output.

./curl -v -u 'john:john' smb://10.10.125.197/share/test.txt
* STATE: INIT => CONNECT handle 0x55e55e6ce738; line 1605 (connection
#-5000)
* Added connection 0. The cache now contains 1 members
* Trying 10.10.125.197:445...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x55e55e6ce738; line 1661
(connection #0)
* Connected to 10.10.125.197 (10.10.125.197) port 445 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x55e55e6ce738; line 1781
(connection #0)
* Marked for [keep alive]: SMB default
* STATE: SENDPROTOCONNECT => PROTOCONNECT handle 0x55e55e6ce738; line 1796
(connection #0)
* SMB conn 0x55e55e6cd970 state change from SMB_CONNECTING to SMB_NEGOTIATE
* Recv failure: Connection reset by peer
* Marked for [closure]: SMB: failed to communicate
* multi_done
* Closing connection 0
* The cache now contains 0 members
* Expire cleared (transfer 0x55e55e6ce738)
curl: (56) Recv failure: Connection reset by peer

I'm using the latest curl version:
./curl --version
curl 7.68.0-DEV (x86_64-pc-linux-gnu) libcurl/7.68.0-DEV OpenSSL/1.1.1
zlib/1.2.11 nghttp2/1.30.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp
smb smbs smtp smtps telnet tftp
Features: AsynchDNS Debug HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM
NTLM_WB SSL TLS-SRP TrackMemory UnixSocket

Am I missing something or curl does not work with windows 10 shares?

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-12-17