Re: [lftp] possible to seek in lftp?

2017-10-09 Thread Alexander V. Lukyanov
On Mon, Oct 09, 2017 at 10:49:16AM +0200, Xen wrote:
> Xen schreef op 08-10-2017 16:32:
>
> > Is there any way to prevent it from seeking?
>
> I meant with the title of course:
>
>
>
> Is it possible to stop seeking in lftp?

Currently it is not possible. For that to be possible, lftp should buffer
some data in memory even after it was sent to the server (until
acknowledged). The exact amount is unknown, so a new setting would be
needed.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.8.0 fails on RHEL/CentOS 6

2017-09-16 Thread Alexander V. Lukyanov
On Fri, Jul 14, 2017 at 04:06:52AM +0200, Andreas M. Kirchwitz wrote:
> Dear LFTP developers,
>
> I'm using lftp on various servers, some of them running RHEL/CentOS 6
> (which is still supported by RedHat for several years :-)
>
> Compilation worked fine with previous versions (eg, 4.7.7) but it fails
> with the brandnew version 4.8.0 of lftp.

Should be fixed in 4.8.1. Thanks for report!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] torrent sharing

2017-09-14 Thread Alexander V. Lukyanov
On Thu, Sep 14, 2017 at 09:56:19PM +0800, Stu Midgley wrote:
> and of course... their was a similar test in dht-bootstrap .
>
> I have removed both tests and they at least talk to each other.

I think I'll make a new setting allowing DHT and bittorrent to private
networks (off by default).

--
   Alexander.

> On Thu, Sep 14, 2017 at 9:48 PM, Stu Midgley  wrote:
>
> > Right... and line 743,1131 in DHT.cc and 575,586 in Torrent.cc
> >
> > I modified the is_private function in network.cc to
> >
> > bool sockaddr_u::is_private() const
> >
> > {
> >
> >if(sa.sa_family==AF_INET)
> >
> >{
> >
> >   unsigned char *a=(unsigned char *)&in.sin_addr;
> >
> >   return (0==1);
> >
> >}
> >
> > #if INET6
> >
> >if(family()==AF_INET6) {
> >
> >   return IN6_IS_ADDR_SITELOCAL(&in6.sin6_addr)
> >
> >   || IN6_IS_ADDR_LINKLOCAL(&in6.sin6_addr);
> >
> >}
> >
> > #endif
> >
> >return false;
> >
> > }
> >
> >
> >
> > and it still didn't work.
> >
> >
> > On Thu, Sep 14, 2017 at 9:25 PM, Alexander V. Lukyanov 
> > wrote:
> >
> >> On Thu, Sep 14, 2017 at 09:12:40PM +0800, Stu Midgley wrote:
> >> > Thanks for the quick response.
> >> >
> >> > I started the bootstrap-dht and the lftp client and server on the single
> >> > machine (172.16.250.40) which is a machine without external access to
> >> the
> >> > internet (hence why I want to run my own dht bootstrap service.
> >> ...
> >> > I don't see lftp contacting the bootstrap service.
> >>
> >> It appears that lftp refuses to talk DHT to private IP addresses (see
> >> DHT.cc:296). I don't know if that's correct, but I was thinking about
> >> security of private networks when I coded this.
> >>
> >> --
> >>Alexander.
> >>
> >
> >
> >
> > --
> > Dr Stuart Midgley
> > sdm...@gmail.com
> >
>
>
>
> --
> Dr Stuart Midgley
> sdm...@gmail.com

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] torrent sharing

2017-09-14 Thread Alexander V. Lukyanov
On Thu, Sep 14, 2017 at 09:12:40PM +0800, Stu Midgley wrote:
> Thanks for the quick response.
>
> I started the bootstrap-dht and the lftp client and server on the single
> machine (172.16.250.40) which is a machine without external access to the
> internet (hence why I want to run my own dht bootstrap service.
...
> I don't see lftp contacting the bootstrap service.

It appears that lftp refuses to talk DHT to private IP addresses (see
DHT.cc:296). I don't know if that's correct, but I was thinking about
security of private networks when I coded this.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] torrent sharing

2017-09-14 Thread Alexander V. Lukyanov
On Thu, Sep 14, 2017 at 03:56:39PM +0800, Stu Midgley wrote:
> Afternoon
>
> I've been trying to get lftp to share a directory to a torrent and then
> download it via the torrent on another machine.
>
> Unfortunately, I haven't had any success.
>
> on machine1, I have setup and installed bootstrap-dht from
>
> https://github.com/bittorrent/bootstrap-dht
>
> and then from machine2 I then run lftp and issue
>
> set torrent:use-dht yes
> torrent --dht-bootstrape=machine1

I recommend turning on debug in lftp before this command and see how
bootstrapping goes. Maybe it's a port mismatch problem. lftp uses 6881 by
default.

Do you really need your own bootstrapper service? I can usually bootstrap
from one of: dht.transmissionbt.com, router.utorrent.com,
router.bittorrent.com.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [PATCH] Czech translation for 4.8.0

2017-07-14 Thread Alexander V. Lukyanov
Applied. Thanks!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp-4.8.0 released.

2017-07-10 Thread Alexander V. Lukyanov
Hello!

lftp version 4.8.0 has been just released.

What's new:
* mirror: improved performance of --scan-all-first for big trees.
* mirror: new --flat option to flatten the target directory structure.
* mmv: new command for file moving; redirect mv to mmv in certain cases.
* fixed compilation with newer openssl (1.1.0 and later).
* du: allow multiple --exclude options to be combined.
* new setting cmd:nullglob for `glob' command prefix.
* http: use proppatch to set last-modified property.
* new settings net:connection-limit-timer and ftp:too-many-re.
* ftp: dynamically ajust connection limit.
* ftp: fixed core dump on LINK/SYMLINK when the command is not supported.
* get1: fixed -o option.
* sftp,fish: connect-program setting is now passed to the shell for execution.
* get/mget/put/mput: add -P option for parallel transfers and long options.
* appimage: new make target for making an AppImage file.
* fixed "local glob".

http://lftp.tech/get.html

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] LFTP HTTP CONNECT support

2017-06-21 Thread Alexander V. Lukyanov
On Wed, Jun 21, 2017 at 08:14:50PM +, Eric Laganowski wrote:
> I want to ask the following question: as you likely know already you can
> tunnel pretty much any of the lftp-supported protocols over HTTP CONNECT
> tunnel; thus my question is: is it possible to configure an HTTP proxy
> within lftp and make all protocols use that proxy via HTTP CONNECT method?
> For example tunnel SFTP via HTTP proxy?

It's not possible. Only ftp over http proxy (with CONNECT method) is
supported.

SFTP is implemented with ssh as backend, ssh does the connection. So lftp
cannot control the method of connection. The same for FISH.

It should be possible to implement this connection method for torrent,
but I'm not sure if there is any demand.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Problem parsing list output : no automatic mirror nor browse is possible

2017-05-12 Thread Alexander V. Lukyanov
Please try commit 4a68c00e773eca3efa12f1c2cd0c91ecb088e600 or the patch in
attachment.

--
   Alexander.


On Thu, May 11, 2017 at 05:03:18PM +, Alexander Lukyanov wrote:
> I'll add a workaround. Thanks for the report!
>
> чт, 11 мая 2017, 19:58 Franck Eyraud :
>
> > Hello,
> >
> > I have the problem with a FTP server, mirroring is not taking into account
> > any folder for recursion. I think I noticed why: when running ls command,
> > all folders are suffixed with a slash, this doesn't happen on other FTP
> > servers I tried. It seems that this cause lftp to completely ignore them.
> >
> >
> > dr-x--   3 user group0 May 11 16:33 folder1/
> > dr-x--   3 user group0 May 11 16:33 folder2/
> > dr-x--   3 user group0 May 11 16:33 folder3/
> > dr-x--   3 user group0 May 11 16:33 folder4/
> >
> > cls command return an empty list, du gives output "./ 0", as if no folder
> > where present there.
> >
> > The debug .mplist command gives :
> >
> > Size=4096;Modify=20170511162938.894;Type=dir;Perm=el; folder1/
> > Size=4096;Modify=20170511162938.894;Type=dir;Perm=el; folder2/
> > Size=4096;Modify=20170511162938.894;Type=dir;Perm=el; folder3/
> > Size=4096;Modify=20170511162938.894;Type=dir;Perm=el; folder4/
> >
> > I tried to look for some parameter, for instance use-msld or list-options
> > (but what option to provide), but it doesn't change.
> >
> > Manually changing directory with cd, and mirroring files work correctly.
> >
> > I can understand that the FTP server is buggy, but is there a way to work
> > around that ?  Of course, I have no control over the server, that would be
> > too easy, I have to deal with this, and download data from there...
> >
> > Thank you !
> >
> > Franck
commit 4a68c00e773eca3efa12f1c2cd0c91ecb088e600
Author: Alexander V. Lukyanov 
Date:   Fri May 12 11:28:46 2017 +0300

FtpListInfo.cc: chomp the trailing slash (workaround for some servers)

diff --git a/src/FtpListInfo.cc b/src/FtpListInfo.cc
index c7c963e..2840197 100644
--- a/src/FtpListInfo.cc
+++ b/src/FtpListInfo.cc
@@ -106,6 +106,8 @@ FileSet *Ftp::ParseLongList(const char *buf,int len,int 
*err_ret) const
 {
tmp_line.set(line);  // parser can clobber the line - work on a copy
FileInfo 
*info=(*line_parsers[i])(tmp_line.get_non_const(),&err[i],tz);
+   if(info && info->name.length()>1)
+  info->name.chomp('/');
if(info && !strchr(info->name,'/'))
   set[i]->Add(info);
else
@@ -129,6 +131,8 @@ FileSet *Ftp::ParseLongList(const char *buf,int len,int 
*err_ret) const
   else
   {
 FileInfo *info=(*guessed_parser)(line.get_non_const(),the_err,tz);
+if(info && info->name.length()>1)
+   info->name.chomp('/');
 if(info && !strchr(info->name,'/'))
(*the_set)->Add(info);
 else
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] HTTP/2.0

2017-04-26 Thread Alexander V. Lukyanov
On Wed, Apr 26, 2017 at 12:44:21PM +0200, Juan Simón wrote:
> Hi,
> Does lftp support HTTP/2.0? If yes, how enable it in lftp?

No, not yet. But it would not benefit much anyway, as the real benefits of
http/2.0 come from simultaneous (interleaved) downloads of multiple
components of a web page.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Make certificate verification great again

2017-03-21 Thread Alexander V. Lukyanov
On Mon, Mar 20, 2017 at 11:49:46PM +0100, Daniel Fazekas wrote:
> On Mar 20, 2017, at 14:55, Nathanaël Naeri  wrote:
> > Is that an issue that this hosting company could do something about? I
> > can ask their sysadmins for help.
>
> It's a common setup mistake to make for server admins that they only add the 
> server certificate to their configuration. Normally you also need to add one 
> or more CA intermediate certs so that clients, which only normally carry and 
> trust a bundle of root certs, could successfully verify the whole chain.
> It's generally as simple as concatenating the intermediate cert(s) after your 
> server certificate, for the server admin.
>
> This could be the issue causing your problems, and something only they can 
> fix, short of you manually adding that  missing intermediate cert on all your 
> client systems, working around their mistake.

This seems to be the issue. The certificate chain of the ftp server is not
a chain, but rather a single link. It's necessary either change the server's
certificate to the full chain to the root CA, or add the "next link" to the
local CA storage.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Make certificate verification great again

2017-03-13 Thread Alexander V. Lukyanov
I can't reproduce the problem. Here is what I get with OpenSSL 1.0.2k:

Certificate depth: 3; subject: /C=SE/O=AddTrust AB/OU=AddTrust External TTP 
Network/CN=AddTrust External CA Root; issuer: /C=SE/O=AddTrust AB/OU=AddTrust 
External TTP Network/CN=AddTrust External CA Root
Certificate depth: 2; subject: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO 
CA Limited/CN=COMODO RSA Certification Authority; issuer: /C=SE/O=AddTrust 
AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
Certificate depth: 1; subject: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO 
CA Limited/CN=COMODO RSA Organization Validation Secure Server CA; issuer: 
/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA 
Certification Authority
Certificate depth: 0; subject: 
/C=FR/postalCode=77310/ST=Seine-et-Marne/L=PRINGY/street=IMPASSE DU 
BREAU/O=SDBX FRANCE/OU=0002 529997199/CN=*.seedbox.fr; issuer: /C=GB/ST=Greater 
Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation 
Secure Server CA
Certificate verification: subjectAltName: ‘www.seedbox.fr’ matched

And with GnuTLS 3.5.10:

Certificate: C=FR,postalCode=77310,ST=Seine-et-Marne,L=PRINGY,street=IMPASSE DU 
BREAU,O=SDBX FRANCE,OU=0002 529997199,CN=*.seedbox.fr
 Issued by:C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA 
Limited,CN=COMODO RSA Organization Validation Secure Server CA
 Checking against: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA 
Limited,CN=COMODO RSA Organization Validation Secure Server CA
  Trusted
Certificate: C=GB,ST=Greater Manchester,L=Salford,O=COMODO CA Limited,CN=COMODO 
RSA Organization 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

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp-4.7.6 compilation error - lftp_ssl.cc:1069:17: error: aggregate 'X509_OBJECT obj' has incomplete type and cannot be defined

2017-02-16 Thread Alexander V. Lukyanov
Please test "compile-with-openssl-1-1-0" branch from github. Thanks!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] "mirror --include-glob=..." doesn't works well

2017-02-07 Thread Alexander V. Lukyanov
On Thu, Feb 02, 2017 at 12:46:22PM +0100, Juan Simón wrote:
> lftp v4.7.5
>
> I have several folders in server with similar name:
>
>- Body Search/
>- Body Soul 1/
>- Body Soul 2/
>- Body Soul 3/
>- Body Soul 4/
>
> I execute
>
> mirror -I "Body*"

This command should download files matching "Body*" in all folders.

When the first include/exclude option is "include", then all files (but not
folders) are excluded first. Folders are matched with a slash appended, so
you can exclude all folders using "-X */" and then include some folders by
"-I Body*/".

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Insert a unicode value in prompt

2017-01-11 Thread Alexander V. Lukyanov
On Wed, Jan 11, 2017 at 05:07:56PM +0100, Juan Simón wrote:
> I want to add a powerline symbol in lftp prompt.The codepoint is f233.
> In terminal I can print it with
>
> > echo "\uf233"
> >
> ​Is there any way ​to do this in lftp prompt?

You can just insert the utf-8 representation of the symbol. If it's difficult
to type it using the keyboard, use copy/paste.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] 4.7.4 zlib buffer error?

2016-12-12 Thread Alexander V. Lukyanov
On Thu, Dec 08, 2016 at 08:33:50AM -0800, David R Bosso wrote:
> (gdb) p &z
> $2 = (z_stream *) 0x13e2010
> (gdb) p z.state
> $3 = (internal_state *) 0x14febb0

Please also do "p *z.state"

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] 4.7.4 zlib buffer error?

2016-12-09 Thread Alexander V. Lukyanov
On Thu, Dec 08, 2016 at 03:37:46PM -0800, David R Bosso wrote:
> Hi, here’s a first run at valgrind. It’s been a while since I’ve used it, let 
> me know if you want it run with other options.
>
> http://pastebin.com/BHSFAQtX

Thanks! I've fixed two unrelated problems based on the output, but found
nothing related to zlib. I think I'll have to dig into zlib to find the exact
place where it generates the Z_STREAM_ERROR. But I'll have to reproduce
the problem for that first.

As a workaround you can disable mode-z (set ftp:use-mode-z off).

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] 4.7.4 zlib buffer error?

2016-12-07 Thread Alexander V. Lukyanov
On Wed, Dec 07, 2016 at 09:16:29AM -0800, David R Bosso wrote:
> Thanks. Let me know if this helps. This was with "mirror --parallel=20 
> —reverse"
>
> -David
>
> lftp: buffer_zlib.cc:131: virtual void DataDeflator::PutTranslated(Buffer*, 
> const char*, int): Assertion `ret != (-2)' failed.
>
> Program received signal SIGABRT, Aborted.
> 0x7646c5f7 in raise () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install 
> glibc-2.17-106.el7_2.8.x86_64 gmp-6.0.0-12.el7_1.x86_64 
> gnutls-3.3.8-14.el7_2.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 
> krb5-libs-1.13.2-12.el7_2.x86_64 libcom_err-1.42.9-7.el7.x86_64 
> libffi-3.0.13-16.el7.x86_64 libgcc-4.8.5-4.el7.x86_64 
> libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64 
> libtasn1-3.8-2.el7.x86_64 ncurses-libs-5.9-13.20130511.el7.x86_64 
> nettle-2.7.1-4.el7.x86_64 openssl-libs-1.0.1e-51.el7_2.7.x86_64 
> p11-kit-0.20.7-3.el7.x86_64 pcre-8.32-15.el7_2.1.x86_64 
> readline-6.2-9.el7.x86_64 trousers-0.3.13-1.el7.x86_64 
> xz-libs-5.1.2-12alpha.el7.x86_64 zlib-1.2.7-15.el7.x86_64
> (gdb) bt
> #0  0x7646c5f7 in raise () from /lib64/libc.so.6
> #1  0x7646dce8 in abort () from /lib64/libc.so.6
> #2  0x76465566 in __assert_fail_base () from /lib64/libc.so.6
> #3  0x76465612 in __assert_fail () from /lib64/libc.so.6
> #4  0x0055b13e in DataDeflator::PutTranslated (this=0x13e1fb0, 
> target=0x14e4958,
> put_buf=0x1672e30 
> "\334[Esm;\255\301\302H\233q\234\343\034\236\275\351\001s^\361\005\276\202\221Iw\005\303\305+m\017\020R\003z\034\221[ڮ\242\272f\231-\364\220\273\210\300&5#w$\fu\306y\240\016R\373\304֚}坥\334SE%\312\356\313.\026>:\023\334\347\216\063\315a\307\342}?P\323\365G\236\322\177&\314\354\232)#\311e9\355\333\361\351L\vQ\353\061\303\341H\365-3O\177(DLp\f\001\030\031\344\363\320c  ..., size=4947) at buffer_zlib.cc:131

Thanks. Please do also these commands in gdb:

frame 4
p z
p &z
p z.state

Also try to run lftp under valgrind.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] 4.7.4 zlib buffer error?

2016-12-07 Thread Alexander V. Lukyanov
On Tue, Dec 06, 2016 at 08:26:25AM -0800, David R Bosso wrote:
> I’ve compiled lftp 4.7.4 on CentOS 7 and am running into an error when 
> running (reverse) mirror with a high parallel number.
> Running with parallel <5 seems to be fine, but when I run with 10 or 20, I 
> get the following:
> lftp: buffer_zlib.cc:131: virtual void DataDeflator::PutTranslated(Buffer*, 
> const char*, int): Assertion `ret != (-2)' failed.

Please compile lftp using "configure --with-debug", run it under gdb and when 
it faults type "info stack" or "bt"; post the output.
Also it could be useful if you turned on debug messages using "debug" command 
in lftp.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] ANNOUNCE: lftp-4.7.4

2016-11-17 Thread Alexander V. Lukyanov
On Wed, Nov 16, 2016 at 04:39:46PM +0300, Alexander V. Lukyanov wrote:
> Get the source from http://lftp.tech/get.html
> Binaries for Fedora will be available soon.

Binaries for Fedora 23 are available now.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] ANNOUNCE: lftp-4.7.4

2016-11-16 Thread Alexander V. Lukyanov
Version 4.7.4 - 2016-11-16

* mirror: new option --directory (-F) for source directories glob pattern.
* mirror: fixed coredump with --depth-first + --recursion=newer.
* mirror: create inaccessible directories anyway.
* pget, torrent: avoid long delays in posix_fallocate(3) call.
* new setting dns:name for host aliases.
* ftp: allow SSL after certain types of ftp proxy.
* http: fixed interpretation of links without a protocol.
* cls: fixed glob metacharacter unquoting.
* sftp: fixed mirroring of files with a leading tilde.
* fixed transfer logging.

Get the source from http://lftp.tech/get.html
Binaries for Fedora will be available soon.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Issues with 4.7.2 and mirror --Move

2016-07-29 Thread Alexander V. Lukyanov
On Fri, Jun 17, 2016 at 12:57:38AM -0500, Jim Cole wrote:
> The behavior that I get is that the 'movies' directory is removed from the
> remote server.
> My understanding is that if the remote directory has a slash at the end
> that it wouldn't remove it.

This bug should be fixed in 4.7.3

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp minor spelling correction

2016-07-11 Thread Alexander V. Lukyanov
On Sat, Jul 02, 2016 at 04:32:03PM +0200, Noël Köthe wrote:
> Hello Alexander,
>
> just a pedantic spelling patch:

Applied. Thanks!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] --size-range=RANGE examples?

2016-06-13 Thread Alexander V. Lukyanov
On Mon, Jun 13, 2016 at 10:24:34AM -0700, Steven Dennis wrote:
> Hello.  I would like to limit the size of files that are mirrored but I am
> unsure of the format that I should use.  I would like to mirror all files
> that at 0-200 MB in size.
>
> Would this work?
>
> --size-range=*0MB-200MB*

I think --size-range=0-200M would work. Test it using --dry-run.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] "kill all" only kills actual job

2016-06-08 Thread Alexander V. Lukyanov
On Tue, Jun 07, 2016 at 09:25:43PM +0200, Juan Simón wrote:
> lftp v4.7.2
> Steps to reproduce:
>
>1. Queue several downloads with "queue pget" or "queue mirror"
>2. Try to kill all jobs (actual and queued) with "kill all"
>
> Expected result:
> All jobs (actual and queued) should be stopped and removed.
>
> Actual result:
> Only it stops and removes the running job.

Should be fixed in 81376d3939d52b735fafd3fddb84cd3acc3225b0
Thanks for report!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp not removing files from local directory

2016-05-18 Thread Alexander V. Lukyanov
On Tue, May 17, 2016 at 06:36:16AM -0700, Steven Dennis wrote:
> Thanks for taking a look at my code.  I thought that the -e enabled lftp to
> delete files.  If I remove the --newer-than what option should I use and
> where should I put it to delete files on the target side when not on the
> remote side?

I don't see -e either.

I was wrong about --newer-than option, it should not limit files to be removed.
Add -vvv options to see the files to be deleted.

--
   Alexander.

> On May 16, 2016 11:33 PM, "Alexander Lukyanov"  wrote:
>
> > Also --newer-than limits the file sets on the target side too, so older
> > files won't be deleted.
> >
> > вт, 17 мая 2016, 9:31 Alexander Lukyanov :
> >
> >> I don't see the --delete option in your command line.
> >>
> >> пн, 16 мая 2016, 19:30 Steven Dennis :
> >>
> >>> Hello everyone,
> >>>
> >>> I am trying get lftp to make my local folders match my remote folder.
> >>> When I delete a file/folder on the remote I want lftp to remove it on the
> >>> local as well.  The man page says I can use the -e or --delete or
> >>> --delete-first
> >>>
> >>> This is what I have been using and am not sure why it isn't deleting
> >>> local files and folders that have been removed from the remote site.
> >>>
> >>> lftp -u user,pass -e "set sftp:connect-program 'ssh -a -x -T -c arcfour
> >>> -o Compression=no'; mirror -v -c --newer-than=now-4hours --loop
> >>> --use-pget-n=3  /home/user/finished/TV /home/pi/usrmnt/Target/; quit"
> >>> sftp://XXX.XXX.XXX.XXX:XXX
> >>>
> >>> Any help is greatly appreciated.
> >>>
> >>> Thanks
> >>>
> >>> Steve
> >>> ___
> >>> lftp mailing list
> >>> lftp@uniyar.ac.ru
> >>> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
> >>>
> >>

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] http authentication on lftp 4.7.x versions

2016-05-06 Thread Alexander V. Lukyanov
On Wed, May 04, 2016 at 01:42:39PM +0100, Frederico Costa wrote:
> Hi,
>
> Thanks for the reply.
>
> here is the debug output from 4.7.1, i used debug 3 command:

Please try this patch. As a workaround you can also try to specify user
name (and possibly password) in the URL:

   open https://u...@www.mufley.com
   open https://user:p...@www.mufley.com

--
   Alexander.
diff --git a/src/Http.cc b/src/Http.cc
index c4d2163..fadc98c 100644
--- a/src/Http.cc
+++ b/src/Http.cc
@@ -469,7 +469,7 @@ void Http::SendAuth()
   SendBasicAuth("Authorization",user,pass);
   return;
}
-   SendAuth(HttpAuth::WWW,user,last_uri);
+   SendAuth(HttpAuth::WWW,user?user:auth_user,last_uri);
 }
 void Http::SendCacheControl()
 {
@@ -1082,22 +1082,10 @@ void Http::HandleHeaderLine(const char *name,const char 
*value)
case_hh("WWW-Authenticate",'W') {
   if(status_code!=H_Unauthorized)
 return;
-  const char *user=this->user;
-  const char *pass=this->pass;
-  if(!user || !pass) {
-// try auth info from http:authorization setting
-const char *auth_c=Query("authorization",hostname);
- if(auth_c && *auth_c) {
-   char *auth=alloca_strdup(auth_c);
-   char *colon=strchr(auth,':');
-   if(colon) {
-  *colon=0;
-  user=auth;
-  pass=colon+1;
-   }
-}
-  }
-  NewAuth(value,HttpAuth::WWW,user,pass);
+  if(user && pass)
+NewAuth(value,HttpAuth::WWW,user,pass);
+  else
+NewAuth(value,HttpAuth::WWW,auth_user,auth_pass);
   return;
}
case_hh("Proxy-Authenticate",'P') {
@@ -2313,6 +2301,20 @@ void Http::Reconfig(const char *name)
if(!QueryBool("use-allprop",c))
   allprop="";
allprop_len=strlen(allprop);
+
+   if(!user || !pass) {
+  // get auth info from http:authorization setting
+  const char *auth_c=Query("authorization",hostname);
+  if(auth_c && *auth_c) {
+char *auth=alloca_strdup(auth_c);
+char *colon=strchr(auth,':');
+if(colon) {
+   *colon=0;
+   auth_user.set(auth);
+   auth_pass.set(colon+1);
+}
+  }
+   }
 }
 
 bool Http::SameSiteAs(const FileAccess *fa) const
diff --git a/src/Http.h b/src/Http.h
index bea3b4d..c8a7c8e 100644
--- a/src/Http.h
+++ b/src/Http.h
@@ -169,6 +169,9 @@ class Http : public NetAccess
void NewAuth(const char *hdr,HttpAuth::target_t target,const char 
*user,const char *pass);
void SendAuth(HttpAuth::target_t target,const char *user,const char *uri);
 
+   xstring_c auth_user;
+   xstring_c auth_pass;
+
bool use_propfind_now;
const char *allprop;
int allprop_len;
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Run for a certain time

2016-05-05 Thread Alexander V. Lukyanov
On Wed, May 04, 2016 at 11:27:38AM -0600, pe...@secs.net.au wrote:
> LFTP is working well and I run it nightly in some cron jobs. However I would
> like the jobs to exit after say 6 hours and then when it fires up again the
> next night to pick up from where it left off. Is that possible?

Yes. As stated in another answer, you can use "timeout" command
(see "man 1 timeout").

But there is also built-in lftp command "at", so you can run something like:

lftp 

Re: [lftp] [FEATURE REQUEST] Disk space preallocation

2016-04-29 Thread Alexander V. Lukyanov
On Mon, Apr 25, 2016 at 07:57:34PM +0200, Juan Simón wrote:
> Hi,
> It would be good to add an option for preallocate disk space of download
> files.

I think it's a good idea for pget. For plain 'get' it will prevent transfer 
resume (reget).

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] download speed drops sharply

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 11:28:07AM +0200, Juan Simón wrote:
> I'm testing with another server and same problem.
> I've defined in config file:
> ...
> set mirror:no-empty-dirs yes;
> set mirror:order "/*";
> set mirror:parallel-directories yes;
> set mirror:parallel-transfer-count 5;
> set mirror:set-permissions no;
> set mirror:use-pget-n 3;
> 
>
> But when I execute 'jobs -v 1' only I see 3 downloads:

I guess all other files have been transferred already.
mirror:parallel-transfer-count is only applied to different files,
mirror:use-pget-n is applied to every single file.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 10:55:35AM +0200, Juan Simón wrote:
> In the similar way that there is a "--norc" option, it would be easy
> add one option "--rc rc.config" that it allows specify the config file
> easily.

"-e 'source rc.config'" should help. But I agree that --rc option is nice
and would be useful. Multiple --rc should be allowed.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 10:52:28AM +0200, Franck Eyraud wrote:
> I suggest that your solution is in your other email, and is the one I used
> for years :
>
> One dir for each server, or group of servers, with specific config
> (.lftp/rc, .lftprc and even .netrc), and set HOME to this dir before
> launching lftp.
>
> HOME=/path/to/server1 lftp
>
> Or some easy bash script wrapper that runs lftp that way...

There is also LFTP_HOME environment variable, using it you can avoid the
extra .lftp subdirectory (or XDG .local and .config).

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Variables in rc file?

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 10:00:02AM +0200, Juan Simón wrote:
> Is there possible to use variables in rc file (similar to BASH, ZSH, etc.)?
> For example, to define the HOME folder.

Unfortunately, no. Set HOME before starting lftp.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2016-04-29 Thread Alexander V. Lukyanov
On Fri, Apr 29, 2016 at 09:37:27AM +0200, Juan Simón wrote:
> Actually I connect to several FTP servers and I would like define
> configuration rules different for each one. How can I do this?

That's what closures were made for.

For example:

   set ftp:sync-mode/ftp.onesite.com yes
   set ftp:sync-mode/ftp.another.org no
   set net:timeout/*.domain.net 30

--
   Alexander.


> 2015-03-18 11:11 GMT+01:00 Juan Simón :
>
> > Ok, that option is just what I wanted. I don't think this option should
> > skip /etc/lftp.conf too. The option name (norc) is quite descriptive
> > about rc (user) file no system file.
> >
> > I didn't find that option because:
> >
> >1. The 'lftp -h' doesn't show this option.
> >
> >>$ lftp -h
> >>Usage: lftp [OPTS] 
> >>`lftp' is the first command executed by lftp after rc files
> >> -fexecute commands from the file and exit
> >> -c execute the commands and exit
> >> --help  print this help and exit
> >> --version   print lftp version and exit
> >>Other options are the same as in `open' command
> >> -e execute the command just after selecting
> >> -u [,]  use the user/password for authentication
> >> -puse the port for connection
> >>   host name, URL or bookmark name
> >>
> >>2. In man file the options of lftp command are near the end, when I
> >think they should be at the beginning.
> >
> >
> > 2015-03-18 8:13 GMT+01:00 Alexander V. Lukyanov :
> >
> >> On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
> >> > It would be great an option to specify a config file different of
> >> default.
> >> > It would be useful another option to indicate to lftp that it doesn't
> >> load
> >> > any config file, that it uses the default values.
> >>
> >> There is "lftp --norc" option, but it currently skips only user-specific
> >> rc
> >> files, and still loads system-wide /etc/lftp.conf
> >>
> >> Probably it should be changed to skip /etc/lftp.conf as well.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] EPSV or PASV?

2016-04-27 Thread Alexander V. Lukyanov
On Mon, Apr 25, 2016 at 10:24:05PM +0200, Juan Simón wrote:
> Hi,
> Server: Pure-FTPd server
> Client: lftp 4.7.1
> I use IPv4, what is the best mode: PASV or EPSV?

They are almost the same. The main difference is router support for NAT
and also support for IPv6.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] pget:save-status = never?

2016-04-27 Thread Alexander V. Lukyanov
On Tue, Apr 26, 2016 at 01:30:51PM +0200, Juan Simón wrote:
> ​​Hi,
> If I set 'pget:save-status = never', will lftp be able resume downloads?

No, pget needs the status file for resuming the transfer.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] HTTPS

2016-04-20 Thread Alexander V. Lukyanov
On Tue, Apr 19, 2016 at 06:16:46PM -0500, Nate Sutton wrote:
> Thanks for doing this, Alexander. Would you consider using a certificate
> that allows peer verification? Self-signed certificates can be MITM
> attacked, which is what I was hoping to avoid with HTTPS. Maybe use a free
> one via https://letsencrypt.org/ ? It's really easy to get setup, it's
> free, and it was setup (and is run) by reputable people.

I've installed letsencrypt certificate, it was very easy to do.
I did not know about letsencrypt before, it's cool.

--
   Alexander.


> On Fri, Apr 15, 2016 at 3:22 AM, Alexander V. Lukyanov  wrote:
>
> > On Wed, Apr 13, 2016 at 04:07:31PM -0500, Nate Sutton wrote:
> > > Is there any way to get binaries from the lftp site over HTTPS?
> >
> > I have enabled https with a self signed certificate. Enjoy:
> > https://lftp.yar.ru
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] HTTPS

2016-04-15 Thread Alexander V. Lukyanov
On Wed, Apr 13, 2016 at 04:07:31PM -0500, Nate Sutton wrote:
> Is there any way to get binaries from the lftp site over HTTPS?

I have enabled https with a self signed certificate. Enjoy: https://lftp.yar.ru

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] FTPS slowed down at 4.5

2016-04-15 Thread Alexander V. Lukyanov
On Thu, Apr 14, 2016 at 09:07:51PM -0500, Nate Sutton wrote:
> I recently upgraded lftp from 4.2.2 to 4.6.5 and I noticed that FTPS slowed
> down quite a bit. I bisected versions and determined that the slowdown
> began at 4.5.0 and continues through 4.7.1. With 4.4.16 I'm peaking at 53
> M/s downloads (with pget -n 5) with this server but with 4.5.0 I'm peaking
> at ~330 K/s (again, with pget -n 5) with the same file and server.

ssl performance should be improved in 4.7.0, I specifically tuned it.

Please provide strace output of lftp version 4.7.1 and 4.4.16 for comparision.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp results in corrupted files with one https server

2016-04-15 Thread Alexander V. Lukyanov
On Thu, Apr 14, 2016 at 08:59:57PM +, Jethro Tull wrote:
> I'm trying to download this file 
> "https://slackbuilds.org/slackbuilds/14.1/office/libreoffice-helppack.tar.gz";.
>  I first tried with lftp -c get 
> "https://slackbuilds.org/slackbuilds/14.1/office/libreoffice-helppack.tar.gz";;
>  It does download something but tar complains that it's not a gzip archive 
> when trying to open it and I tried with wget, it worked well. The file I 
> downloaded with lftp is ~ 10 KB, and the one with wget is ~ 2.6 KB. No need 
> to mention that their md5 are different. I get the same problem with all the 
> other files I tried to download with lftp from "https://slackbuilds/org";, but 
> I have not noticed any problem on the few other https repositories I tried 
> such as "https://www.kernel.org/pub"; and a few archlinux mirrors I found on 
> their website.

Please try a current lftp version (the newest is 4.7.1). The problem is
automatic uncompressing entities with "Content-Encoding: gzip". The
workaround was added in lftp version 4.5.6.

You can also do "set http:decode false" to disable uncompressing.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] misbehaving HTTP server makes lftp retry forever

2016-04-14 Thread Alexander V. Lukyanov
On Thu, Apr 14, 2016 at 01:50:35AM -0500, Nate Sutton wrote:
> I tried it and setting it to a low timeout setting (10) made it fail with a
> timeout, so it does work for the purpose, but if possible I'd like to just
> limit the number of retries. Is there a setting I'm missing, maybe?

It should not be set to a low value, the default is one day. The timer is
reset every time when the transfer goes over "high watermark". So when the
transfer starts over and does not reach the high watermark for the
specified in xfer:timeout time, the transfer times out and fails.

--
   Alexander.

> On Wed, Apr 13, 2016 at 8:46 PM, Nate Sutton 
> wrote:
>
> > What should I be setting this to? I don't quite understand how setting a
> > timeout will fix this issue, could you explain? lftp isn't stalling for
> > very long while downloading and intermittent stalls in transfers ought to
> > be tolerated, so I wouldn't want to set it too low. And besides, the error
> > message "recv: SSL_read: error::lib(0):func(0):reason(0)" implies
> > that the peer shut down the connection, right? It seems in this case that
> > limiting the number of retries when the peer terminates the connection
> > would be better, since otherwise it gets that error message and retries the
> > transfer again and again forever.
> >
> > Thoughts?
> >
> > On Wed, Apr 13, 2016 at 5:00 AM, Alexander V. Lukyanov 
> > wrote:
> >
> >> On Tue, Mar 29, 2016 at 07:37:06PM -0500, Nate Sutton wrote:
> >> > I'm downloading from an HTTP server where it stops sending the file at
> >> > about 40 MB and then stops sending data. lftp doesn't seem to handle
> >> this
> >> > very well and retries the transfer over and over and over, indefinitely.
> >> >
> >> > https://gist.github.com/nate/e7e47d3a86118439c36a1877847d8b01
> >> >
> >> > This happens with pget -n 5, pget -n 1, and get.
> >> >
> >> > Is this expected behavior? Is there a way to disable it? Or set a max
> >> > number of retries? net:max-retries is already set to 3...
> >>
> >> Please test
> >>
> >> https://github.com/lavv17/lftp/commit/989b10e928d73136ef2460572350f14a6a6d14c7
> >> or http://lftp.yar.ru/ftp/devel/lftp-4.7.1.8-a7ceb-dirty.tar.gz
> >> which introduces new xfer:timeout setting.
> >>
> >> --
> >>Alexander.
> >>
> >
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] misbehaving HTTP server makes lftp retry forever

2016-04-13 Thread Alexander V. Lukyanov
On Tue, Mar 29, 2016 at 07:37:06PM -0500, Nate Sutton wrote:
> I'm downloading from an HTTP server where it stops sending the file at
> about 40 MB and then stops sending data. lftp doesn't seem to handle this
> very well and retries the transfer over and over and over, indefinitely.
>
> https://gist.github.com/nate/e7e47d3a86118439c36a1877847d8b01
>
> This happens with pget -n 5, pget -n 1, and get.
>
> Is this expected behavior? Is there a way to disable it? Or set a max
> number of retries? net:max-retries is already set to 3...

Please test
https://github.com/lavv17/lftp/commit/989b10e928d73136ef2460572350f14a6a6d14c7
or http://lftp.yar.ru/ftp/devel/lftp-4.7.1.8-a7ceb-dirty.tar.gz
which introduces new xfer:timeout setting.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.7.1

2016-04-04 Thread Alexander V. Lukyanov
lftp-4.7.1 has been released. Changes:

Version 4.7.1 - 2016-04-04

* http: fixed authentication for proxy, transient errors, max-retries=1.
* http: fixed put with authentication not to use HEAD request.
* translations updated (cs, ru).

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Czech translation for lftp 4.7.0

2016-04-04 Thread Alexander V. Lukyanov
On Thu, Mar 31, 2016 at 05:24:55PM +0200, Petr Pisar wrote:
> Hello,
>
> I updated Czech translation for 4.7.0 sources and the compressed catalog
> is attached.

Will be included in 4.7.1. Thanks!

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] ftp: wait for QUIT reply before closing control socket

2016-03-30 Thread Alexander V. Lukyanov
On Tue, Mar 29, 2016 at 06:25:27PM -0500, Nate Sutton wrote:
> Is there a way to disable this? I just went from 4.2.2 to 4.6.5 and at
> least one FTP server I integrate with doesn't always reply to QUIT
> commands. I'm not sure of the implications of `set ftp:use-quit false` so

I think `set ftp:use-quit false` is quite safe.
You can also do `set net:timeout 1' before disconnecting.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.7.0

2016-03-28 Thread Alexander V. Lukyanov
lftp-4.7.0 has been released. Changes:

Version 4.7.0 - 2016-03-28

* ftp: add MODE Z support.
* ftp: new settings ftp:use-mode-z, ftp:compressed-re, ftp:mode-z-level.
* ftp: add MFF support for chmod.
* ftp: prefer EPSV by default.
* ftp: prefer CWD-relative paths.
* ftp: enable MLSD by default (when supported).
* ftp: assume AUTH is supported based on other newer features.
* http: add support for digest authentication.
* http: fixed webdav directory listing.
* http: fixed a coredump when using a proxy for https.
* sftp: fixed mirror to sftp with xfer:use-temp-file set.
* ssl: optimized ssl for speed and lower syscall count.
* ssl: log server's certificate fingerprint.
* ssl: allow disabling certificate verification by its fingerprint.
* get: rename backup file back if new file cannot be retrieved.
* get: new settings xfer:backup-suffix and xfer:keep-backup.
* get/put/mget/mput/pget/get1: add -q (quiet) option.
* edit: allow creating a new file.
* new debug option -T (truncate output file).
* new mirror options: --{in,ex}clude-{rx,glob}-from.
* new mirror options: --Remove-source-dirs, --Move.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp date error

2016-03-11 Thread Alexander V. Lukyanov
On Fri, Mar 11, 2016 at 11:46:56AM +0100, Pedro Jiménez wrote:
> Downloaded files have a wrong modified date, they are exactly 1 month back,
> that is, files downloaded today should have date 11 March 2016, but they
> have 11 February 2016. I have checked the date at server and it's correct.

Turn on debug to see what happens. Maybe "set ftp:use-mdtm no" will help you.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Excluding list of files?

2016-03-10 Thread Alexander V. Lukyanov
Ok, I have added new mirror options. Please see 
https://github.com/lavv17/lftp/commit/391b5b9ee0c9f5c58cfad0951f3f6b1e15a12cc2

On Thu, Mar 10, 2016 at 05:36:59PM +, Alexander Lukyanov wrote:
> Is it better to list file patterns in the file or plain file paths?
>
> вт, 1 марта 2016, 7:56 Steven Dennis :
>
> > Hello,
> >
> > I want to create a list of all the files that lftp has d/l to my local
> > computer and then use that list to have the next run exclude them from
> > being d/l again.  I cannot find anything specific in the man page that
> > allows you to use a file with stuff to exclude.
> >
> > I did come across this post
> >
> > https://multimerch.com/blog/rsync-lftp-and-exclude-lists/
> >
> > "I searched for an ftp alternative to rsync and stumbled upon lftp in this
> > post. It looked really nice until I found out lftp doesn't support exclude
> > lists, which means you can't make it read exclude patterns from a file. The
> > good news is, lftp does allow you to specify multiple --exclude switches at
> > once, so I modified the command to make use of my exclude-list.txt like
> > this:
> >
> >
> > lftp -u username,password -e "mirror --only-newer sed 's/^/--exclude /'
> > exclude-list.txt | tr 'n' ' ' --reverse /path/to/local/dir
> > /path/to/public_html" server.com
> >
> > This way, sed prepends every line with an --exclude switch and tr replaces
> > newlines so in the end we have our lftp mirror command with all necessary
> > excludes in it."
> >
> > but am not sure if there is a more simple approach as this seems
> > complicated to a beginner in linux.
> >
> > Please let me know if this is the best way to exclude files from d/l from
> > a file.
> >
> > Thanks
> > ___
> > lftp mailing list
> > lftp@uniyar.ac.ru
> > http://univ.uniyar.ac.ru/mailman/listinfo/lftp
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] D/L files that are 24hr old?

2016-02-24 Thread Alexander V. Lukyanov
On Mon, Feb 22, 2016 at 01:59:09PM -0800, Steven Dennis wrote:
> Why would it mirror folders that are older than 4 hours?

Because they may contain new files. Directory modification time does not
change when a file inside it changes, especially many levels down.

You can use --recursion=newer if you like.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] D/L files that are 24hr old?

2016-02-19 Thread Alexander V. Lukyanov
On Thu, Feb 18, 2016 at 09:10:01PM -0800, Steven Dennis wrote:
> I would like to d/l files and folders from a directory on my web server
> that have been put there or modified in the last 24 hours.
>
> I have read the man page and came across the --newer-than option.
>
> "For option --newer-than you can either specify a file or time specification
> like that used by *at*(1) command, e.g. `now-7days' or `week ago'. If you
> specify a file, then modification time of that file will be used."
>
> Can you tell me if this would be correct?

I think "now-1day" or "now-24hours" would be correct.

> lftp open -u user,pass sftp://XXX.XXX.XXX.XXX -P mirror -c --newer-than
> 24hrs /remote/directory/ /local/directory/

Use this:
lftp -c "pen -u user,pass sftp://XXX.XXX.XXX.XXX && mirror -c --newer-than 
now-1day /remote/directory/ /local/directory/"
I don't know what you mean by -P.

> Also can you tell me if there are other time parameters that can be used as
> well as the "grammar" that should be used when putting this together?

Sure. It's all documented in at(1) man page (try "man at"). The grammar is
in /usr/share/doc/at/timespec file.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RV: lftp & compressed transmission to improve bandwidth consumption

2015-12-16 Thread Alexander V. Lukyanov
On Tue, Nov 17, 2015 at 08:06:53PM -0300, Alejandro Gonzalez wrote:
> I will compile and test, then I will send you feedback. About the
> compression level selector will be useful.

You can try the latest development snapshot from
ftp://ftp.yar.ru/pub/source/lftp/devel/lftp-4.6.5.90.tar.gz

> I need to compile it using the size optimization because we need to use it
> in an embedded system, could you tell me
> what is the best combination of flags, disabling SSL, encryption, etc. ?

I think you can use

CXXFLAGS=-Os CFLAGS=-Os ./configure --with-modules --without-openssl 
--without-gnutls

then remove unneeded modules from /usr/lib/lftp/4.6.5.90 to save some space.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Setting up FTPS connection question...

2015-12-01 Thread Alexander V. Lukyanov
On Tue, Dec 01, 2015 at 02:46:16AM -0800, Steven Dennis wrote:
> lftp :~> open ftps://@XX.XX.XX.XX -p21201
>  gnutls_handshake: An unexpected TLS packet was received.
> ls: Fatal error: gnutls_handshake: An unexpected TLS packet was received.

ftps expects the connection to be encrypted from the very beginning. Most
probably you have set up ftp server so that the connection is plain text.
Use plain ftp:// and "set ftp:ssl-force yes" to make sure you are using
encrypted connection.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RV: lftp & compressed transmission to improve bandwidth consumption

2015-11-16 Thread Alexander V. Lukyanov
On Thu, Nov 12, 2015 at 10:42:46AM -0300, Alejandro Gonzalez wrote:
> Hi Alexander,
>
> thanks for your response, I enabled FTP server (mode Z support) on:

Thanks. I have implemented basic MODE Z support in
https://github.com/lavv17/lftp/commit/573a50ddca19d1c5f1a57538a2925633b477d812
please give it a try.

Things to do: document it in the man page, add bzip2 support (is it really
needed?), add another setting to select compression level on upload.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RV: lftp & compressed transmission to improve bandwidth consumption

2015-11-12 Thread Alexander V. Lukyanov
On Thu, Aug 20, 2015 at 02:59:11PM -0300, Alejandro Gonzalez wrote:
> nice to meet you, I'm Alejandro from Argentina (Alexander in Spanish). I'm
> using lftp application, is a very nice tool, on an embedded application
> 
> and I'm searching to improve the bandwidth consumption. In many internet
> places are published commentaries about MODE Z

Please send me an address of any server supporting MODE Z, I'll try to
implement it as it does not seem too hard.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.6.4

2015-08-21 Thread Alexander V. Lukyanov
lftp-4.6.4 has been released. Changes:

Version 4.6.4 - 2015-08-20

* mirror: new option --transfer-all.
* torrent: new setting torrent:timeout to limit time without any progress.
* torrent: fixed handling of udp tracker without explicit port number.
* torrent: improved transfer start time after metadata download.
* improved sftp put -c to use a single FSETSTAT.
* mirror --skip-noaccess now uses user name to check for permissions.
* don't rename temporary file to the target name when transfer fails.
* new cmd:prompt escapes \l and \L for local working directory.
* translations updated (pl, ru, uk).
* new configure option --disable-ipv6.
* fixed compilation with an old gcc.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Insert current working directory at local in prompt

2015-08-19 Thread Alexander V. Lukyanov
On Wed, Aug 19, 2015 at 03:26:27PM +0200, Juan Simón wrote:
> l by local? ;-)

Ok, please see 
https://github.com/lavv17/lftp/commit/5084726c2533abd382baf4b404cef28af64846b6

-- 
   Alexander.

> 2015-08-19 15:24 GMT+02:00 Alexander V. Lukyanov :
> 
> > On Wed, Aug 19, 2015 at 01:04:30PM +0200, Juan Simón wrote:
> > > I don't understand what you mean.
> > >
> > > 2015-08-19 13:00 GMT+02:00 Alexander Lukyanov :
> > >
> > > > I think it can be made possible with a new readline key bindings. Which
> > > > key combination do you suggest?
> > > >
> > > > вт, 18 авг. 2015, 12:35, Juan Simón :
> > > >
> > > >> Is there any way to insert current working directory at local in
> > prompt?
> > > >> Regards.
> >
> > Ok, I see a misunderstanding here. Did you mean to modify the prompt itself
> > to include local working directory? Then it's even easier to do. I'll make
> > a new substitution similar to \w. Please suggest a letter for the
> > substitution.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Insert current working directory at local in prompt

2015-08-19 Thread Alexander V. Lukyanov
On Wed, Aug 19, 2015 at 01:04:30PM +0200, Juan Simón wrote:
> I don't understand what you mean.
> 
> 2015-08-19 13:00 GMT+02:00 Alexander Lukyanov :
> 
> > I think it can be made possible with a new readline key bindings. Which
> > key combination do you suggest?
> >
> > вт, 18 авг. 2015, 12:35, Juan Simón :
> >
> >> Is there any way to insert current working directory at local in prompt?
> >> Regards.

Ok, I see a misunderstanding here. Did you mean to modify the prompt itself
to include local working directory? Then it's even easier to do. I'll make
a new substitution similar to \w. Please suggest a letter for the
substitution.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.6.3a

2015-06-19 Thread Alexander V. Lukyanov
On Fri, Jun 19, 2015 at 06:44:52PM +0200, Juan Simón wrote:
> Thanks.
> Which is the default option to "mirror:recursion" and "mirror:overwrite"?

It's the same as before: "always" and "no".

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.6.3a

2015-06-19 Thread Alexander V. Lukyanov
lftp-4.6.3a has been released. Changes:

Version 4.6.3 - 2015-06-17

* new mirror setting mirror:overwrite and options --overwrite/--no-overwrite.
* new mirror option --upload-older.
* new mirror option --recursion={always,never,missing,newer}.
* try to download zero sized files as they may be non-empty.
* torrent: new options --only-new, --only-incomplete.
* torrent: fixed endless loop in FD deallocation.
* fixed a memleak when parsing a directory listing with special files.
* fixed one byte buffer overflow in cls.
* fixed cmd:fail-exit description in the man page.
* fixed large stack usage when parsing fish directory listings.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.6.1 in cygwin win8.1

2015-05-22 Thread Alexander V. Lukyanov
On Wed, May 20, 2015 at 09:34:40PM +, LeeKiseok wrote:
> I am using lftp version 4.6.1 in cygwin in windows 8.1 system.
>
> However, I am currently having difficulty to connect to the host.
>
> When I type “lftp anysite” It just says “find host….” and stay hangs there 
> forever. In windows 7 there is no this problem though!
>
> What am I doing wrong?

You can try "set dns:use-fork no" and see if it helps.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Openstack swift

2015-04-17 Thread Alexander V. Lukyanov
On Fri, Apr 17, 2015 at 02:25:40PM +0200, Szépe Viktor wrote:
> "OpenStack software controls large pools of compute, storage, and networking
> resources throughout a datacenter"
> http://www.openstack.org/
> 
> Swift is object storage for OpenStack
> http://docs.openstack.org/developer/swift/
> 
> Is lftp in C++?
> https://wiki.openstack.org/wiki/SDKs#C

I wouldn't use a pre-made SDK, as it will be most probably blocking and
there will be no guarantees of reliable work in case of temporary
networking problems.

Maybe it would be possible to adapt existing Http implementation and
implement Swift REST protocol on top of it.

But I don't have any openstack/swift infrastructure handy, so I won't be
able to test it. It means I won't be able to develop such a thing
effectively.

> Idézem/Quoting "Alexander V. Lukyanov" :
> 
> >On Thu, Apr 16, 2015 at 01:49:32PM +0200, Szépe Viktor wrote:
> >>Are you planning to support Openstack swift ?
> >
> >Does it have a special access protocol? What's needed to support it?
> >
> >--
> >   Alexander.
> 
> 
> Szépe Viktor
> -- 
> +36-20-4242498  s...@szepe.net  skype: szepe.viktor
> Budapest, XX. kerület
> 
> 
> 
> 
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] editor

2015-04-17 Thread Alexander V. Lukyanov
On Thu, Apr 16, 2015 at 02:06:20PM +0200, Juan Simón wrote:
> Thanks for the new version.
> I have tested the 'edit' and 'bookmark edit' command and there is a
> problem. I use Ubuntu Linux and I configure the default text editor with
> "update-alternatives --config editor" no with "EDITOR" variable. But lftp
> only uses this variable.

What is the proper way to run the editor alternative? What other programs
run it?

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Openstack swift

2015-04-17 Thread Alexander V. Lukyanov
On Thu, Apr 16, 2015 at 01:49:32PM +0200, Szépe Viktor wrote:
> Are you planning to support Openstack swift ?

Does it have a special access protocol? What's needed to support it?

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.6.2

2015-04-16 Thread Alexander V. Lukyanov
lftp-4.6.2 has been released. Changes:

* new command "edit" instead of the edit alias.
* new setting ssl:priority for disabling selected protocols.
* new settings fish:auto-confirm and sftp:auto-confirm.
* new setting file:use-lock to lock local files before accessing.
* ftp: fixed disconnecting on timeout (broken in 4.6.0).
* http: enclose ipv6 address in brackets in URLs and Host header.
* fixed mirror for http protocol with redirections.
* fixed `bookmark edit' to use correct XDG path if XDG is used.
* fixed a wildcard certificate validation vulnerability (CVE-2014-0139).
* fixed proxy authentication for CONNECT method.
* fixed exit code of `help' command.
* fixed sftp to show file names with slashes.
* fixed pget status display when all chunks are done except the first one.
* Ukrainian translation updated (Yuri Chornoivan).
* Russian translation updated.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp mirror in reverse mode

2015-04-13 Thread Alexander V. Lukyanov
On Mon, Apr 13, 2015 at 09:09:18AM +, Iustin wrote:
> I got the impression that in reverse mode the --use-pget-n=10 option is not
> used.

pget is only for downloading. It cannot be used for upload, at least now.
It is so historically, since plain ftp is unreliable in regard of storing a
shard of a file. Also the pget status is stored every few seconds which is
not feasible for remote connections.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] FTP-over-HTTP

2015-03-26 Thread Alexander V. Lukyanov
On Tue, Mar 24, 2015 at 04:24:44PM -0300, Guilherme Silveira wrote:
> I would like to clarify one thing:  is it possible to implement all
> functionalities the ftp protocol has (download,  upload,  resume
> upload/download,  directory listing,  mirror)  with just pure https,  no
> extension methods or api?

Yes. Turn on automatic directory indexes on the server. For uploading
some extra work is required, but it is possible - the server should handle
PUT request and store the file.

-- 
   Alexander.

> Em 18/03/2015 17:06, "Guilherme Silveira" 
> escreveu:
> 
> > HI,
> >
> > I am new to lftp and would like to ask some questions...Please forgive me
> > if the questions are dumb
> >
> > I need to implement the server side of a communication system that uploads
> > and downloads files. The client side is using lftp as the client.
> >
> > It was agreed to use HTTPS as the communication protocol to do this.
> >
> > I am not an http-protocol expert, but I am wondering if this is possible.
> > Pure HTTPs does not have all functionalities that ftp has, and would be
> > necessary a API on the server side to make it work. For example, HTTPs does
> > not have a command to list the contents of a directory.
> >
> > So, my conclusion is that the only way to implement this would be using
> > ftp-over-http.
> >
> > My question is:
> >
> > 1- What is exactly a  ftp-over-http? How does it works under the hood?
> > 2- What I need to do to implement a server that support ftp-over-http?
> > 3- What tools and software would you use to implement the server side?
> > (for example: apache with mod_proxy, or jboss with something else, etc)
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Add option to specify non-standard zlib

2015-03-20 Thread Alexander V. Lukyanov
On Sun, Feb 22, 2015 at 12:21:14AM -0600, Andrew Reis wrote:
> I'd like to be able to compile against a non-system zlib (and possibly other
> libraries) in non-standard locations. I see that gnutls and openssl can be
> specified but not zlib. Can this be added in the next release?

I have added --with-zlib=/path option, you can test it in the HEAD revision
from github.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] FTP-over-HTTP

2015-03-19 Thread Alexander V. Lukyanov
On Wed, Mar 18, 2015 at 05:06:33PM -0300, Guilherme Silveira wrote:
> I am new to lftp and would like to ask some questions...Please forgive me
> if the questions are dumb
> 
> I need to implement the server side of a communication system that uploads
> and downloads files. The client side is using lftp as the client.
> 
> It was agreed to use HTTPS as the communication protocol to do this.
> 
> I am not an http-protocol expert, but I am wondering if this is possible.
> Pure HTTPs does not have all functionalities that ftp has, and would be
> necessary a API on the server side to make it work. For example, HTTPs does
> not have a command to list the contents of a directory.

Well, many http servers can generate directory indexes automatically, lftp
can parse many formats.

> So, my conclusion is that the only way to implement this would be using
> ftp-over-http.
> 
> My question is:
> 
> 1- What is exactly a  ftp-over-http? How does it works under the hood?

It's accessing ftp server using a http proxy.

> 2- What I need to do to implement a server that support ftp-over-http?
> 3- What tools and software would you use to implement the server side? (for
> example: apache with mod_proxy, or jboss with something else, etc)

You can use mod_proxy and an ftp server on the same host.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [Enhancement] Option to specify config file

2015-03-18 Thread Alexander V. Lukyanov
On Wed, Mar 18, 2015 at 12:49:16AM +0100, Juan Simón wrote:
> It would be great an option to specify a config file different of default.
> It would be useful another option to indicate to lftp that it doesn't load
> any config file, that it uses the default values.

There is "lftp --norc" option, but it currently skips only user-specific rc
files, and still loads system-wide /etc/lftp.conf

Probably it should be changed to skip /etc/lftp.conf as well.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] issue with SITE commands and retries

2015-03-12 Thread Alexander V. Lukyanov
On Thu, Mar 12, 2015 at 09:55:13AM +0100, Mattias Bergvall wrote:
> The problems with FTP-retries is not fixed when setting "net:max-retries 1"
> and "cmd:fail-exit true". Am I using the wrong variables?
> 
> I use "LFTP | Version 4.6.0 | Copyright (c) 1996-2014 Alexander V.
> Lukyanov" with "Libraries used: Readline 5.1, zlib 1.2.3", and still get 1
> automatic FTP retry when the FTP server uncleanly closes the session, (and
> since I didn't set "ftp:site", it didn't re-issue the site commands).

Can you provide debug log from lftp?

> Regarding the double-spaces in the ftp:site option, what would happen if
> there are trailing spaces or more than 2 spaces between two site commands?

Two spaces terminate a single SITE command, if there is third - it becomes
part of the next SITE command.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [LFTP] https_proxy

2015-03-10 Thread Alexander V. Lukyanov
On Wed, Mar 04, 2015 at 09:52:36AM +0100, Vincent Lasselin wrote:
> One example of an unsuccessfull connection with https.

Thanks! Please try this patch.

--
   Alexander.
diff --git a/src/Http.cc b/src/Http.cc
index 9705f36..de01b40 100644
--- a/src/Http.cc
+++ b/src/Http.cc
@@ -414,10 +414,14 @@ void Http::SendBasicAuth(const char *tag,const char 
*user,const char *pass)
SendBasicAuth(tag,xstring::cat(user,":",pass,NULL));
 }
 
-void Http::SendAuth()
+void Http::SendProxyAuth()
 {
if(proxy && proxy_user && proxy_pass)
   SendBasicAuth("Proxy-Authorization",proxy_user,proxy_pass);
+}
+
+void Http::SendAuth()
+{
if(user && pass && !(hftp && !QueryBool("use-authorization",proxy)))
   SendBasicAuth("Authorization",user,pass);
else if(!hftp)
@@ -736,6 +740,8 @@ void Http::SendRequest(const char *connection,const char *f)
 Send("Destination: %s\r\n",GetFileURL(file1));
   }
}
+   if(proxy && !https)
+  SendProxyAuth();
SendAuth();
if(no_cache || no_cache_this)
   Send("Pragma: no-cache\r\n"); // for HTTP/1.0 compatibility
@@ -1322,7 +1328,9 @@ int Http::Do()
AppendHostEncoded(ehost,hostname);
const char *port_to_use=portname?portname.get():HTTPS_DEFAULT_PORT;
const char *eport=url::encode(port_to_use,URL_PORT_UNSAFE);
-   Send("CONNECT %s:%s HTTP/1.1\r\n\r\n",ehost.get(),eport);
+   Send("CONNECT %s:%s HTTP/1.1\r\n",ehost.get(),eport);
+   SendProxyAuth();
+   Send("\r\n");
tunnel_state=TUNNEL_WAITING;
state=RECEIVING_HEADER;
return MOVED;
diff --git a/src/Http.h b/src/Http.h
index fdcecb4..e377a0d 100644
--- a/src/Http.h
+++ b/src/Http.h
@@ -86,6 +86,7 @@ class Http : public NetAccess
xstring special_data;
void DirFile(xstring& path,const xstring& ecwd,const xstring& efile) const;
void SendAuth();
+   void SendProxyAuth();
void SendCacheControl();
void SendBasicAuth(const char *tag,const char *auth);
void SendBasicAuth(const char *tag,const char *u,const char *p);
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] [LFTP] https_proxy

2015-02-25 Thread Alexander V. Lukyanov
On Tue, Feb 10, 2015 at 02:51:04PM +0100, Vincent Lasselin wrote:
> I'm using lftp to access an https url. I'm using an https proxy.
> I've set https_proxy variable and it's not working...
> With wireshark, I've constated that the CONNECT frame is send without 
> credentials to my proxy :
> 
> cd: Access failed: 407 Proxy Authentication Required (...)

You have to provide user and password for the proxy. You can do it in the
proxy URL:

set https:proxy http://user:p...@your-proxy.example.com

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Handling for small files

2015-02-24 Thread Alexander V. Lukyanov
On Tue, Feb 24, 2015 at 11:07:23AM +, akshay gupta wrote:
> I am using fish protocol.

If possible, try to use sftp. Fish is not quite the most efficient option.
Even ftp is better, especially with pipelining (set ftp:sync-mode off).

-- 
   Alexander.

> On Tue, Feb 24, 2015, 4:23 PM Alexander Lukyanov  wrote:
> 
> > Which protocol do you use?
> >
> > вт, 24 февр. 2015, 13:48, akshay gupta :
> >
> > Hi,
> >>
> >> I am trying to transfer about 80GB of data using mirror option. File
> >> sizes are very small about 0.5 KB to 3 KB per file. Transfer is taking a
> >> lot of time which I am attributing to small file size. Is there any option
> >> in lftp which I can use to increase the transfer speed. May be some sort of
> >> compression option like rsync -av*z.*
> >>
> >> I know about the parallel file transfer option but I cant use it because
> >> I want to maintain the order of file transfer.
> >>
> >> Please help.
> >>
> >>
> >> Thanks,
> >>
> >> Akshay
> >>
> >>
> >>
> >>
> >>
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] problem with lftp exit code

2015-02-16 Thread Alexander V. Lukyanov
On Mon, Feb 16, 2015 at 12:22:46PM +, Edward Borst wrote:
> Hi Alexander,
> 
> Unfortunately this does not solve the issue in the correct way.
> Because if the connection is down, or there is a login problem the exit code 
> will also be 0
> 
> I only want the exit status 0 when there is no file.

You can also play with "glob --not-exist", but I suspect there is no perfect 
solution now.
Test the connection first by "cd . || exit 1".

-- 
   Alexander.

> -----Original Message-
> From: Alexander V. Lukyanov [mailto:l...@netis.ru] 
> Sent: maandag 16 februari 2015 13:15
> To: Edward Borst
> Cc: 'lftp@uniyar.ac.ru'
> Subject: Re: [lftp] problem with lftp exit code
> 
> On Mon, Feb 16, 2015 at 07:12:35AM +, Edward Borst wrote:
> > Someone else an idea to solve this?
> > I expected that if I use glob -exist the exit code would be 0.
> 
> You can use this:
>   glob --exist /tmp/mtc/otp*.* || exit 0
> 
> -- 
>Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp as a c/c++ library

2015-02-16 Thread Alexander V. Lukyanov
On Fri, Feb 13, 2015 at 09:56:02AM -0500, Randall McPherson wrote:
> lftp is the best sftp / ftp client I know of, especially for gracefully
> handling the many non-compliant ftp server implementations. It would be
> awesome to use it as a c/c++ library, calling it directly from other code.
> Is it feasible to use part of the lftp code as a library and has anyone
> done this? I couldn't find anything in the man page or other documentation
> saying definitively either way. I've built a small tool in the past that
> runs it using a script file, (`lftp -f`) but it would be great if it could
> be called more interactively as a library.

It's possible to link to liblftp-tasks and liblftp-jobs libraries. The API is
not documented though, there are just several examples in the lftp sources.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] problem with lftp exit code

2015-02-16 Thread Alexander V. Lukyanov
On Mon, Feb 16, 2015 at 07:12:35AM +, Edward Borst wrote:
> Someone else an idea to solve this?
> I expected that if I use glob -exist the exit code would be 0.

You can use this:
glob --exist /tmp/mtc/otp*.* || exit 0

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Problem with Spam in Gmail with this list

2015-02-11 Thread Alexander V. Lukyanov
On Wed, Feb 11, 2015 at 09:43:26AM +0100, Juan Simón wrote:
> Hi,
> I have a problem related to this mail list. Gmail considers some mails of
> this list like spam. I have added the email address of this list in
> contacts but it still occurs. Is there any solution?

I would like to change the list location. Is there a good and free list
server?

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] General question

2015-02-10 Thread Alexander V. Lukyanov
On Tue, Feb 10, 2015 at 08:42:07PM +, Michal Wiczynski wrote:
> My question is if it's possible to download just one file, but using
> mirror.

You can mirror a single file by name (see mirror -f option).

> For example I would like to download oldest file from the server
> without earlier knowing its name and disconnect?

You have to find the name of that file first. E.g.:

cls --sort=date -rF | grep -v '/$' | head -1 > tmp-file
source -e "echo mirror -f `http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp is affected by curl CVE-2014-0139

2015-02-10 Thread Alexander V. Lukyanov
On Tue, Dec 09, 2014 at 06:46:32PM +0100, Vitezslav Cizek wrote:
> Hi,
> I've noticed lftp is using code borrowed from curl.
> That makes lftp affected by CVE-2014-0139:
> http://curl.haxx.se/docs/adv_20140326B.html
> 
> It's not the most critical vulnerability, but anyway,
> I'll suggest to update to code from latest curl for the next release.

Thanks for report!

I've included hostmatch function from the latest curl. The fixed
version is in github now and a snapshot is here:
http://lftp.yar.ru/ftp/devel/lftp-4.6.1.20150210.tar.gz

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.6.1 - issue with close command

2015-01-28 Thread Alexander V. Lukyanov
On Wed, Jan 28, 2015 at 02:52:48PM -0600, System Administrator wrote:
> I'm having an issue understanding the effect of the command *close*, as
> it seems different than a disconnect.
> 
> With lftp 4.6.1:
> 
> open -u "username,password" -p 22 sftp://hostname/
> ls   <- returns a listing
> close
> ls   <- still connects and returns the listing ! I expected this to fail.

It's correct behaviour. "close" command closes connections to the server,
but the server is still selected for communication. To undo an open command,
use:
open ""

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.6.1 - issue with close command

2015-01-28 Thread Alexander V. Lukyanov
On Wed, Jan 28, 2015 at 04:28:10PM -0600, System Administrator wrote:
> Imagine the following scenario:
> 
> open -u "username1,password1" -p 22 sftp://site1/   <- works
> mput /tmp/site1.*   <- works
> close
> 
> open -u "username2,password2" -p 22 sftp://site2/  -< fails
> mput /tmp/site2.*   <- since the lat open failed, still connects to site
> 1 and upload a file, hence high risk.

You can use one on these:

set cmd:fail-exit yes
or
open ... || exit

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.6.1

2015-01-01 Thread Alexander V. Lukyanov
lftp-4.6.1 has been released. Changes:

* new mirror option --scan-all-first.
* mirror --Remove-source-files now removes files already present at the target.
* added a workaround for FUSE with HadoopFS I/O error during rename(2).
* fixed du to round file size up to block size.
* fixed compilation with libressl.
* fixed OPTS MLST, removed trailing semicolon.
* fixed put to sftp with special files (like /dev/stdin).
* fixed ftp to copy SID properly with GnuTLS (Tim Kosse).
* fixed mirror to follow redirections to files (Tomas Hozza).

Get it from http://lftp.yar.ru/get.html or your favorite mirror.
Fedora binaries are also available.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Mirror and ASCII transfer selection

2014-12-15 Thread Alexander V. Lukyanov
On Sat, Dec 13, 2014 at 11:15:40PM +0100, Franck Eyraud wrote:
> There is already a --ascii option to the mirror command (implies
> --ignore-size), which could be selectively applied to files matching a
> pattern.

Wow, I have forgot about this option.

> In fact, I though afterwards the I could get the desired behaviour by
> running 2 successive mirror commands :
> mirror --exclude my_pattern
> mirror --include my_pattern --ascii

You are correct - this solution should work fine.

-- 
   Alexander.


> Le 13/12/2014 19:13, Alexander Lukyanov a écrit :
> >There is no such feature in lftp. I don't think it's feasible to do: ascii
> >mode changes the file and the next mirror will consider the file changed
> >and thus re-transfer it.
> >
> >2014-12-12 14:52 GMT+04:00 Franck Eyraud  >>:
> >
> >Hi lftp list,
> >
> >Just a quick question, because I didn't find in the man page :
> >
> >Is it possible to select the transfert type (binary/ascii) based
> >of file name pattern (e.g. download ascii all *.txt files) when
> >mirroring a ftp server ?
> >I remember that I saw this options on some graphical client, so I
> >was wondering for lftp. I checked also the variables, but I didn't
> >find any.
> >
> >Thank you for your help,
> >
> >Franck
> >
> >___
> >lftp mailing list
> >lftp@uniyar.ac.ru 
> >http://univ.uniyar.ac.ru/mailman/listinfo/lftp
> >
> >
> >
> >-- 
> >   Alexander.
> 

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Compressing data at destination machine

2014-12-02 Thread Alexander V. Lukyanov
On Tue, Dec 02, 2014 at 09:53:08PM +0530, akshay gupta wrote:
> I have tried using it. It does not update the files appearing in the mount
> point if the files in zip changes. And it also does not retains
> modification time of the file at the mount location this could affect the
> mirror.

You have to unmount it before changing the zip file.

> Do you have any other similar opensource software in mind that could also
> support writes.

You can try the other way: ftpfs.

-- 
   Alexander.


> On Fri, Nov 28, 2014 at 1:06 PM, Alexander V. Lukyanov  wrote:
> 
> > On Fri, Nov 28, 2014 at 11:55:07AM +0530, akshay gupta wrote:
> > > I dont want lftp to extract data from archives, I want it to compress it
> > > into archive so that it occupies less space at the destination side. Is
> > > this feasible to do in lftp?
> >
> > Take a look at zipfs: https://github.com/hanwen/go-fuse
> >
> > Unfortunately it is read-only.
> >
> > So you can mount a zip file, run mirror over it with --script option, run
> > the script with an empty target directory, then run zip to update the
> > archive.
> >
> > --
> >Alexander.
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Compressing data at destination machine

2014-11-27 Thread Alexander V. Lukyanov
On Fri, Nov 28, 2014 at 11:55:07AM +0530, akshay gupta wrote:
> I dont want lftp to extract data from archives, I want it to compress it
> into archive so that it occupies less space at the destination side. Is
> this feasible to do in lftp?

Take a look at zipfs: https://github.com/hanwen/go-fuse

Unfortunately it is read-only.

So you can mount a zip file, run mirror over it with --script option, run
the script with an empty target directory, then run zip to update the
archive.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Compressing data at destination machine

2014-11-25 Thread Alexander V. Lukyanov
On Tue, Nov 25, 2014 at 06:44:32PM +0530, akshay gupta wrote:
> I want to store the data that is being pulled by lftp mirror job in a
> compressed format. Is it possible that mirror function can check file
> download status from inside of that tar, zip etc. Is it possible to
> implement such a functionality in lftp?

I don't think mirror will be able to extract compressed archives, but
you can download the archive and extract it at the same time, like this:

lftp> cat file.tar.gz | tar xv

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp minor bug: pwd might print wrong cwp when used as first command

2014-11-24 Thread Alexander V. Lukyanov
On Fri, Nov 21, 2014 at 08:53:19PM +0100, Andreas Luik wrote:
>   we found a small bug in lftp (at least still present in 4.5.4):
> 
> when "pwd" is the first command used, it prints "/" (which is the
> 
> initial cached value), but this might be wrong when the ftp-user's
> 
> home directory is not the root directory (possibly chrooted).

I'd call it a feature. "/" in ftp URLs actually means "home directory".
At first, actual location of the home directory is not known.

> lftp ftpt...@ftp.innovative-navigation.de:~> pwd
> ftp://ftptest:test123$@ftp.innovative-navigation.de/%2Fftptest

And when the home directory location is known, it is displayed with
%2F which means the root directory.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RSS/ATOM feed

2014-10-28 Thread Alexander V. Lukyanov
On Tue, Oct 28, 2014 at 11:08:30AM +0100, Szépe Viktor wrote:
> What can we do now?
> I cannot write a bug report because I do not know how TLS works and  I can't
> speak C.

Submit a Debian bug report, specify exact gnutls package version, provide
samples of the servers having problems with it. I don't think it is needed
to know C to submit a bug report.

> Are you able to read gnutls_certificate_get_peers's source?

I can't reproduce this problem, so it's hard for me to debug it.

--
   Alexander.


> Idézem/Quoting "Alexander V. Lukyanov" :
>
> >On Mon, Oct 27, 2014 at 04:28:11PM +0100, Szépe Viktor wrote:
> >>Thank you for the feed!
> >>
> >>I still have
> >> Certificate verification: Not trusted: no issuer was found
> >>with GNUTLS.
> >>
> >>With your Fedora it is OK.
> >>With gnutls-cli it is also OK on my Debian system.
> >>The problem comes with lftp on my Debian system.
> >>On Fedora 'Issued by' is always == 'Checking against'.
> >>On Debian there is a "mis-comparition".
> >
> >I think it may be a bug in gnutls' function gnutls_certificate_get_peers.
> >It returns the certificate chain, probably it has a missing link or wrong
> >order.
> >
> >>Is it a gnutls issue or an lftp? (gnutls-cli never fails)
> >
> >Probably gnutls-cli uses another certificate verification method.
> >
> >--
> >   Alexander.
>
>
> Szépe Viktor
> --
> +36-20-4242498  s...@szepe.net  skype: szepe.viktor
> Budapest, XX. kerület
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RSS/ATOM feed

2014-10-28 Thread Alexander V. Lukyanov
On Mon, Oct 27, 2014 at 04:28:11PM +0100, Szépe Viktor wrote:
> Thank you for the feed!
>
> I still have
>  Certificate verification: Not trusted: no issuer was found
> with GNUTLS.
>
> With your Fedora it is OK.
> With gnutls-cli it is also OK on my Debian system.
> The problem comes with lftp on my Debian system.
> On Fedora 'Issued by' is always == 'Checking against'.
> On Debian there is a "mis-comparition".

I think it may be a bug in gnutls' function gnutls_certificate_get_peers.
It returns the certificate chain, probably it has a missing link or wrong
order.

> Is it a gnutls issue or an lftp? (gnutls-cli never fails)

Probably gnutls-cli uses another certificate verification method.

--
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Bug in lftp mirror when using xfer:use-temp-file option

2014-10-28 Thread Alexander V. Lukyanov
On Tue, Oct 28, 2014 at 12:59:40PM +0530, akshay gupta wrote:
> will giving --delete-first option in lftp mirror help in my case? I think

This option deletes files not present on the source side first, then starts
downloading. It does not delete the file before overwriting.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] RSS/ATOM feed

2014-10-27 Thread Alexander V. Lukyanov
On Mon, Oct 27, 2014 at 03:15:23PM +0100, Szépe Viktor wrote:
> Could you start a release notification feed for
> http://lftp.yar.ru/events.html ?

Please try http://lftp.yar.ru/events.xml

Feel free to suggest improvements.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Bug in lftp mirror when using xfer:use-temp-file option

2014-10-27 Thread Alexander V. Lukyanov
On Mon, Oct 27, 2014 at 05:53:19PM +0530, akshay gupta wrote:
> now its producing 0 byte files and i am also getting input/output error
> here are the debug logs:
> 
> copy: renaming `/mount/user/tom/test.txt_tmp_' to `test.txt'
> mirror: rename(/mount/user/tom/test.txt_tmp_, /mount/user/tom/test.txt):
> Input/output error

Which filesystem do you use? Maybe it is necessary to unlink target file
before renaming, although rename should do it automatically.

   If  newpath already exists it will be atomically replaced (subject to a
   few conditions; see ERRORS below), so that there is no point  at  which
   another process attempting to access newpath will find it missing.
   
And man page for rename(2) does not list EIO error.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Bug in lftp mirror when using xfer:use-temp-file option

2014-10-27 Thread Alexander V. Lukyanov
On Mon, Oct 27, 2014 at 01:30:42PM +0530, akshay gupta wrote:
> ---> RETR test.txt
> <--- 150 Opening BINARY mode data connection for 'test.txt' (202 bytes).
>  Got EOF on data connection
>  Closing data socket
> <--- 226 Transfer complete.

So the file cannot be renamed locally, right? Is there a permissions problem?

-- 
   Alexander.

> On Mon, Oct 27, 2014 at 1:18 PM, Alexander Lukyanov 
> wrote:
> 
> > Can you provide a debug log? Why lftp cannot replace the old file?
> >
> > 2014-10-27 10:44 GMT+03:00 akshay gupta :
> >
> >> Hi,
> >>
> >> I am trying to mirror files using lftp, I have tested a use case where a
> >> file at the source machine gets modified but the file name remains the
> >> same. After mirroring, lftp is unable to replace the old file and also
> >> leaves a temporary file.
> >>
> >> For example. If source have file a.txt and its mirrored successfully at
> >> the destination, now if I update a.txt append some content and save it with
> >> same name. If I run lftp mirror again then its not able to replace the
> >> existing a.txt but it also leaves the temp file a.txt_transit_ behind. And
> >> if i run the mirror multiple times it always downloads the changed a.txt, i
> >> can see this from the lftp logs.
> >>
> >> Suggestion: Will it make sense to keep versions of the files as they are
> >> updated at the source. Like if a.txt is changed at source then lftp mirror
> >> will save it as a.txt_{TIMESTAMP}_. Every time a file is updated it will be
> >> saved with a new time stamp. And mirror will consider these file to decide
> >> whether to download or not.
> >>
> >>
> >> Thanks,
> >> Akshay
> >>
> >>
> >>
> >>
> >>
> >
> >
> > --
> >Alexander.
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] providing key file for ssh in fish protocol

2014-10-27 Thread Alexander V. Lukyanov
On Mon, Oct 27, 2014 at 01:20:55PM +0530, akshay gupta wrote:
> What if I also want to specify the ssh user for the transfer.

You can specify the user in the URL:

open sftp://USER:@example.org

Note the colon with no password, it is needed for lftp to ask not for a
password when other authentication methods are used.

-- 
   Alexander.

> On Wed, Oct 15, 2014 at 10:51 AM, Alexander V. Lukyanov 
> wrote:
> 
> > On Tue, Oct 14, 2014 at 04:12:50PM +0530, akshay gupta wrote:
> > > I want provide a key file for authentication in fish protocol. Fish
> > > internally uses ssh for connection and ssh have a support for providing
> > key
> > > files for password less authentication, how can I provide key file using
> > > lftp for FISH protocol.
> >
> > You can specify arbitrary ssh options using fish:connect-program setting:
> >
> > set fish:connect-program "ssh -a -x -i your-private-key-file"
> >
> > --
> >Alexander.
> >

> ___
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp

___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.5.6 (stable) and 4.6.0

2014-10-14 Thread Alexander V. Lukyanov
On Tue, Oct 14, 2014 at 02:14:26PM +0200, Juan Simón wrote:
> lftp_ssl.cc:563:62: error: 'GNUTLS_E_PREMATURE_TERMINATION' was not
> declared in this scope
>else if(res==GNUTLS_E_UNEXPECTED_PACKET_LENGTH ||
> res==GNUTLS_E_PREMATURE_TERMINATION)

Please see this patch.

-- 
   Alexander.
diff --git a/src/lftp_ssl.cc b/src/lftp_ssl.cc
index 100b90b..8ef8a8d 100644
--- a/src/lftp_ssl.cc
+++ b/src/lftp_ssl.cc
@@ -547,6 +547,11 @@ int lftp_ssl_gnutls::do_handshake()
 
return DONE;
 }
+
+#ifndef GNUTLS_E_PREMATURE_TERMINATION // for gnutls < 3.0
+# define GNUTLS_E_PREMATURE_TERMINATION GNUTLS_E_UNEXPECTED_PACKET_LENGTH
+#endif
+
 int lftp_ssl_gnutls::read(char *buf,int size)
 {
if(error)
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.5.6 (stable) and 4.6.0

2014-10-14 Thread Alexander V. Lukyanov
On Tue, Oct 14, 2014 at 01:57:58PM +0200, Juan Simón wrote:
> Error to compile lftp-4.6 on Ubuntu 14.04 64 bits with './configure
> --with-modules --without-gnutls --without-openssl':
> Making all in m4
> Making all in doc
> Making all in lib
> Making all in src
> ftpclass.cc: In member function 'virtual int Ftp::Do()':
> ftpclass.cc:1614:22: error: 'PROT' is not a member of 'Ftp::Expect'
>|| expect->Has(Expect::PROT))

My bad. Please see the attached patch.

-- 
   Alexander.
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
index 130704d..bc148bc 100644
--- a/src/ftpclass.cc
+++ b/src/ftpclass.cc
@@ -1610,12 +1610,12 @@ int   Ftp::Do()
 
   if(expect->Has(Expect::FEAT)
   || expect->Has(Expect::OPTS_UTF8)
-  || expect->Has(Expect::LANG)
-  || expect->Has(Expect::PROT))
+  || expect->Has(Expect::LANG))
 goto usual_return;
 
 #if USE_SSL
-  if(expect->Has(Expect::CCC))
+  if(expect->Has(Expect::CCC)
+  || expect->Has(Expect::PROT))
 goto usual_return;
 #endif // USE_SSL
 
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] providing key file for ssh in fish protocol

2014-10-14 Thread Alexander V. Lukyanov
On Tue, Oct 14, 2014 at 04:12:50PM +0530, akshay gupta wrote:
> I want provide a key file for authentication in fish protocol. Fish
> internally uses ssh for connection and ssh have a support for providing key
> files for password less authentication, how can I provide key file using
> lftp for FISH protocol.

You can specify arbitrary ssh options using fish:connect-program setting:

set fish:connect-program "ssh -a -x -i your-private-key-file"

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.5.6 (stable) and 4.6.0

2014-10-14 Thread Alexander V. Lukyanov
lftp-4.5.6 and 4.6.0 have been released. Changes:

Version 4.6.0:

* new torrent --share option.
* new setting mirror:require-source.
* new settings xfer:use-temp-file and xfer:temp-file-name.
* ftp: wait for QUIT reply before closing control socket.
+ fixes from 4.5.6

Version 4.5.6 (stable - bug fixes only):

* display valid IDN in URLs without percent encoding.
* ftp: shutdown SSL connection before closing control socket.
* ftp: avoid duplication of PROT command.
* fixed debug -o to append to the log file.
* fixed compilation without SSL.
* http: don't uncompress files ending with .gz, .Z or .tgz
* http: fixed inflation of some files.
* minor fixes in torrent protocol.

Get them from http://lftp.yar.ru/get.html or your favorite mirror.
(4.5.6 ia available from http://lftp.yar.ru/ftp/)
Binaries for Fedora 20 are also available.

Try also torrent download (just for fun):
   
magnet:?xt=urn:btih:1036E2211338395ED405DFD2E1A7C0E250B84787&xl=2626600&dn=lftp-4.6.0.tar.gz
   
magnet:?xt=urn:btih:C3ACE41CC267CA4CB61788E26CB192247DC05200&xl=2618661&dn=lftp-4.5.6.tar.gz
   
magnet:?xt=urn:btih:0BFE6089110E19607C3B6A53F7AF1F1F4E44D442&xl=671392&dn=lftp-4.6.0-1.x86_64.rpm
   
magnet:?xt=urn:btih:FA79A16118782CE5818B742E1209686B8BA76083&xl=667412&dn=lftp-4.5.6-1.x86_64.rpm

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] LFTP, download only files from TODAY

2014-10-13 Thread Alexander V. Lukyanov
On Sat, Oct 11, 2014 at 02:34:19PM +0200, Vlad Olariu wrote:
> I am wondering if with lftp I can sync only files that were created TODAY
> (the day I execute lftp).

See mirror --newer-than option. I think "00:00 today" argument should do.

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] possible bug in lftp mirror using xfer:use-temp-file option

2014-10-03 Thread Alexander V. Lukyanov
On Tue, Sep 30, 2014 at 10:35:37PM +0530, akshay gupta wrote:
> Its causing unpredictable behaviour in case of fuse mounted file system.
> Please look into it if it can be resolved.

Please test the new snapshot 
http://lftp.yar.ru/ftp/devel/lftp-4.5.5.20141003.tar.gz

-- 
   Alexander.
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


  1   2   3   4   5   6   7   8   9   10   >