curl / Mailing Lists / curl-library / Single Mail

curl-library

How to get list of files in directory smb

From: Artem Smirnov <artem.smirnov.russia_at_gmail.com>
Date: Mon, 30 Jul 2018 10:30:31 +0300

Hello all,

I'm trying to get a list of files in the directory with libcurl from the
SMB server. But I have a error:

curl -u "DOMAIN\login:password" smb://fs/january/soft
curl: (56) Failure when receiving data from the peer

curl -u "DOMAIN\login:password" smb://fs/january/soft/
curl: (56) Failure when receiving data from the peer

If I try to get the file then everything will be okay:

curl -u "DOMAIN\login:password" smb://fs/january/soft/asn1ve.rar > 1
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left
 Speed100 9103k 100 9103k 0 0 4056k 0 0:00:02 0:00:02
--:--:-- 4055k

How to get list of files in directory smb libcurl?

Environment:
artem_at_artempc:~$ curl -V
curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8
libidn/1.32 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB
SSL libz TLS-SRP UnixSockets
OS: Ubuntu 16.04 LTS 64-bit

Best regards,
Smirnov Artem

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-07-30