[lftp] lftp 4.4.11

2013-11-11 Thread Alexander V. Lukyanov
lftp-4.4.11 has been released. Changes:

* fixed a slow down in mirror from http (thanks to OGAWA Hirofumi).
* fixed a coredump in sftp when accessing an inexistent file.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.

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


Re: [lftp] Question About Parallel Mode and Inconsistency

2013-11-12 Thread Alexander V. Lukyanov
On Tue, Nov 12, 2013 at 01:02:45PM -0800, Tim Kelsch wrote:
 Hello,
 I'm using LFTP v4.4.8 on rhel6u2 to reverse mirror thousands of files from
 5 client hosts to 2 different to VSFTPD servers (2.2.2) on rhel6u2. We're
 running anywhere between 10-40 LFTP clients on each client host. I'll hold
 off on giving more details here as my first question has more to do with
 something I saw in the documentation (http://lftp.yar.ru/lftp-man.html)
 that alarmed me. In the Commands section, under the Mirror command:
 
 -P,  --parallel[=N]download N files in parallel
 
 
 No problem there, but reading on in the Settings section:
 
 *cmd:parallel* (number)
   Number  of jobs run in parallel in non-interactive mode.
 For example, this may be useful for scripts with multiple `get'
 commands.  Note  that  setting  this  to  a  value greater  than  1
 changes conditional execution behaviour, basically makes it
 inconsistent.

These option and setting are unrelated. Conditional execution of commands
happens when commands are separated by  or ||.

 So I'm wondering if there is any possibility that the parallel
 argument to the mirror command could cause inconsistent behavior.

No.

 My second question is what exactly does inconsistent behavior mean?
 My third question is what constitutes conditional execution?

Consider this example:

set cmd:parallel 2
get file1; get file2  get file3

In this case file1 and file2 will be transferred in parallel, and file3
will be transferred conditionally based on exit code of the first finished
transfer. Without cmd:parallel=2 file3 will only be transferred if file2
has been transferred successfully.

For the slowness, you can try a few settings to speed it up (try them
separately):

set ftp:sync-mode no
set ftp:use-mlsd yes
set ftp:use-stat-for-list yes
set ftp:use-mdtm no

See what setting works for you. Turn on debug in lftp, it may make it clear.

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


Re: [lftp] Overwriting with 'put -c' command

2013-11-15 Thread Alexander V. Lukyanov
On Fri, Nov 15, 2013 at 10:47:51AM +0100, Arnaud Rébillout wrote:
 when doing some tests with lftp, I found a strange behavior with the
 'put -c' command.
 
 If I want to copy a file to a FTP server, and the file already
 exists, it seems that the file is copied only if the source is
 bigger than the destination.
 Is it the expected behavior ?

Yes. put -c is meant for transfer resume. If target file is larger than 
the source file, then the transfer cannot be resumed.

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


Re: [lftp] Recursive directory list without ls -R option?

2013-11-15 Thread Alexander V. Lukyanov
On Thu, Nov 14, 2013 at 12:47:25PM +, Marijn Kampf wrote:
 I'm trying to get a recursive list of all files uploaded to an SFTP
 server including file size and date. Unfortunately the server
 doesn't support the ls -R option.

 I can get an overview of file size with:
 du -ba

 Is there a way to add the file creation date to the above command in lftp?

This patch adds find -l command option. HTH.

--
   Alexander.
diff --git a/doc/lftp.1 b/doc/lftp.1
index f81ad01..0ad75be 100644
--- a/doc/lftp.1
+++ b/doc/lftp.1
@@ -41,7 +41,7 @@
 .fi
 .in
 ..
-.TH lftp 1 08 Oct 2013
+.TH lftp 1 15 Nov 2013
 .SH NAME
 lftp \- Sophisticated file transfer program
 .SH SYNTAX
@@ -58,7 +58,7 @@ lftp \- Sophisticated file transfer program
 .B lftp \-\-help
 
 .SH VERSION
-This man page documents lftp version 4.4.10.
+This man page documents lftp version 4.4.12.
 
 .SH DESCRIPTION
 \fBlftp\fR is a file transfer program that allows sophisticated ftp, http
@@ -261,12 +261,19 @@ command is used.
 .PP
 Alias for `wait'.
 
-.B find
-.RI  [ directory ] 
+.BR find  [ OPTS ]  \fIdirectory...\fP
 .PP
 List files in the directory (current directory by default) recursively.
 This can help with servers lacking ls \-R support. You can redirect output
-of this command.
+of this command. Options:
+.Sp
+.in +0.5i
+.TS
+l1 l   lx  .
+\-d \fIMD\fP,  \-\-max\-depth=\fIMD\fP specify maximum scan depth
+\-l,   \-\-listuse long listing format
+.TE
+.PP
 
 .BR ftpcopy
 .PP
diff --git a/src/FileSet.h b/src/FileSet.h
index 51ccdf1..a2d69ae 100644
--- a/src/FileSet.h
+++ b/src/FileSet.h
@@ -89,6 +89,7 @@ public:
~FileInfo();
 
void SetName(const char *n) { name.set(n); def(NAME); }
+   void SetName(const xstring n) { name.set(n); def(NAME); }
void SetUser(const char *n);
void SetGroup(const char *n);
void LocalFile(const char *name, bool follow_symlinks);
diff --git a/src/FindJob.cc b/src/FindJob.cc
index b42f0b0..8275b0d 100644
--- a/src/FindJob.cc
+++ b/src/FindJob.cc
@@ -360,24 +360,36 @@ FinderJob::prf_res FinderJob_List::ProcessFile(const char 
*d,const FileInfo *fi)
   fg_data=buf-GetFgData(fg);
if(buf-Size()0x1)
   return PRF_LATER;
+
+   xstring path_to_show;
if(ProcessingURL())
{
   FileAccess::Path old_cwd=session-GetCwd();
   session-SetCwd(init_dir);
   session-Chdir(dir_file(d,fi-name),false);
-  buf-Put(session-GetConnectURL());
+  path_to_show.set(session-GetConnectURL());
   session-SetCwd(old_cwd);
}
else
-  buf-Put(dir_file(d,fi-name));
+  path_to_show.set(dir_file(d,fi-name));
if((fi-definedfi-TYPE)  fi-filetype==fi-DIRECTORY  
strcmp(fi-name,/))
-  buf-Put(/);
+  path_to_show.append('/');
+
+   if(long_listing) {
+  FileInfo n(*fi);
+  n.SetName(path_to_show);
+  n.MakeLongName();
+  buf-Put(n.longname);
+   } else {
+  buf-Put(path_to_show);
+   }
+
buf-Put(\n);
return FinderJob::ProcessFile(d,fi);
 }
 
 FinderJob_List::FinderJob_List(FileAccess *s,ArgV *a,FDStream *o)
-   : FinderJob(s), args(a)
+   : FinderJob(s), args(a), long_listing(false)
 {
if(o)
   buf=new IOBufferFDStream(o,IOBuffer::PUT);
diff --git a/src/FindJob.h b/src/FindJob.h
index a6767a3..6d88b49 100644
--- a/src/FindJob.h
+++ b/src/FindJob.h
@@ -117,12 +117,14 @@ class FinderJob_List : public FinderJob
 {
SMTaskRefIOBuffer buf;
RefArgV args;
+   bool long_listing;
 protected:
prf_res ProcessFile(const char *d,const FileInfo *fi);
void Finish();
 
 public:
FinderJob_List(FileAccess *s,ArgV *a,FDStream *o);
+   void DoLongListing(bool yes=true) { long_listing=yes; }
 
int Done() { return FinderJob::Done()  buf-Done(); }
 };
diff --git a/src/commands.cc b/src/commands.cc
index 6c24185..d70a7bc 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -2850,13 +2850,15 @@ CMD(find)
static struct option find_options[]=
{
   {maxdepth,required_argument,0,'d'},
+  {ls,no_argument,0,'l'},
   {0,0,0,0}
};
int opt;
int maxdepth = -1;
+   bool long_listing=false;
const char *op=args-a0();
 
-   while((opt=args-getopt_long(+d:,find_options))!=EOF)
+   while((opt=args-getopt_long(+d:l,find_options))!=EOF)
{
   switch(opt)
   {
@@ -2868,6 +2870,9 @@ CMD(find)
 }
 maxdepth = atoi(optarg);
 break;
+  case 'l':
+long_listing=true;
+break;
   case '?':
 eprintf(_(Usage: %s [-d #] dir\n),op);
 return 0;
@@ -2878,6 +2883,7 @@ CMD(find)
   args-Append(.);
FinderJob_List *j=new class 
FinderJob_List(session-Clone(),args.borrow(),output.borrow());
j-set_maxdepth(maxdepth);
+   j-DoLongListing(long_listing);
return j;
 }
 
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp 4.4.10: *** Error in `lftp': double free or corruption (!prev): 0x0000000001149700 ***

2013-11-24 Thread Alexander V. Lukyanov
On Thu, Nov 21, 2013 at 05:15:08PM -0500, Justin Piszcz wrote:
 lftp crashes when I run cls -l:

 *** Error in `lftp': double free or corruption (!prev): 0x01149700

I still could not reproduce the problem. But please try this patch and report
if it makes any difference.

--
   Alexander.
diff --git a/src/OutputJob.cc b/src/OutputJob.cc
index fc09524..ebaa090 100644
--- a/src/OutputJob.cc
+++ b/src/OutputJob.cc
@@ -228,7 +228,7 @@ OutputJob::OutputJob(const char *path, const char *a0, 
FileAccess *fa0)
Init(a0);
 }
 
-OutputJob::~OutputJob()
+void OutputJob::PrepareToDie()
 {
Bg();
AcceptSig(SIGTERM);
@@ -236,6 +236,10 @@ OutputJob::~OutputJob()
Delete(input);
if(input != output)
   Delete(output);
+   input=0;
+   output=0;
+
+   super::PrepareToDie();
 }
 
 /* This is called to ask us permission to display a status line. */
diff --git a/src/OutputJob.h b/src/OutputJob.h
index f925b01..99e3292 100644
--- a/src/OutputJob.h
+++ b/src/OutputJob.h
@@ -71,7 +71,7 @@ class OutputJob : public Job
 public:
OutputJob(FDStream *output, const char *a0);
OutputJob(const char *path, const char *a0, FA *fa=0);
-   ~OutputJob();
+   void PrepareToDie();
 
/* Set the main filter: */
void SetFilter(const char *f) { filter.set(f); }
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


[lftp] lftp 4.4.13

2013-11-27 Thread Alexander V. Lukyanov
lftp-4.4.13 has been released. Changes:

* new option -l (--ls) for find command.
* improve workaround for single NL replies from an FTP server.
* Ukrainian translation updated (Yuri Chornoivan).
* fixed spinning in get when no remote session is open.
* don't pre-fetch file information in get when not needed.
* fixed handling of 400/501 http codes for PROPFIND to switch to HEAD.
* fixed a crash after cls.
* added file size decrease checking.
* used a newer libtool for ppc64le platform.

Get it from http://lftp.yar.ru/get.html or your favorite mirror.

(4.4.12 was an unfortunate release with a last minute bug and was withdrawn).

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


Re: [lftp] Compiling with ncursesw

2013-11-27 Thread Alexander V. Lukyanov
On Wed, Nov 27, 2013 at 07:53:39AM -0500, Chris Sutcliffe wrote:
 Is it possible to specify using ncursesw versus ncurses at time of
 configuration?

No. But why do you need it? lftp only uses tigetstr function from ncurses, so
the version of ncurses library should not matter.

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


Re: [lftp] lftp-4.4.13 -- multi-core/multi-threading support for get on 10GbE networks?

2013-11-28 Thread Alexander V. Lukyanov
On Thu, Nov 28, 2013 at 03:47:54PM -0500, Justin Piszcz wrote:
 When transferring data on high speed networks (10GbE) lftp hits 100% on a
 moderately fast Xeon CPU (E5645), the FTP server is not the bottleneck as it
 uses around 37% CPU (different CPU on the server host).  Are there any plans
 to spin off separate workers (if possible) so a single CPU-core is not a
 bottleneck at the client-side?

I don't think multithreading is going to be implemented in lftp. I avoided
it from the start as single-threading makes programming and debugging
easier.

But I think it is possible to squeeze more performance by optimization.
First provide me with profiling information (compile with -pg gcc option,
then run lftp, then run gprof, send me the output), then be ready to try
optimized versions to see if they make a difference.

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


Re: [lftp] lftp segmentation fault

2013-12-06 Thread Alexander V. Lukyanov
On Fri, Sep 27, 2013 at 07:06:30PM +, Terry Mark wrote:
 Hi there,
 
 After compiling lftp (with ./configure  make), I get a segmentation fault 
 error immediately after calling lftp.
 
 This is on CentOS 6.4, x86_64.
 
 Any help or advice would be greatly appreciated.

Use the latest lftp version, compile it with debug information (configure
--with-debug), run it under gdb and get stack trace when it crashes using
info stack command.

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


Re: [lftp] lftp mirror how to handle just a few sub dirs ?

2013-12-06 Thread Alexander V. Lukyanov
On Thu, Oct 10, 2013 at 01:57:28PM +, smokisalmon wrote:
 
 Therefore my -include filter was 
 --include ^/BLA.D[0-9][0-9][0-9][0-9]/.*$
 
 
 --
 mirror --delete  --no-empty-dirs --only-newer --include
 ^/a/b/BLA.D[0-9][0-9][0-9][0-9] --newer-than=now-7days --verbose=3 ./a/b/
 ./a/b/ 
 
 but it doesnt work at all. The result directory is completly empty.

The pattern matches the path after the base (i.e. ./a/b/ is not included).
Try -i ^/BLA.D[0-9][0-9][0-9][0-9].

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


Re: [lftp] ftp vs sftp

2013-12-23 Thread Alexander V. Lukyanov
On Fri, Dec 20, 2013 at 07:09:36AM -0500, Robert DuToit wrote:
 lftp -u username/password server to connect via an expect script. We need to 
 specify whether it is sftp or ftp
 
 does   lftp -u username/password sftp://server; guarantee that is an sftp 
 connection?

Yes. You can also specify login/password in the URL like this:

lftp sftp://username:password@server

 Just want to be sure my usage sets the protocol correctly for lftp to use 
 with ftp or sftp.

You can turn on debug and see that the protocol is really sftp (lftp -d
option or command debug).

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


Re: [lftp] Problem with lftp and

2013-12-24 Thread Alexander V. Lukyanov
On Tue, Dec 17, 2013 at 11:34:04PM +0400, Rodriguez Garcia, Jose Luis wrote:
 I have compiled lftp-4.4.14 and lftp-4.4.8 versions of lftp on Solaris.
 
 The problems is that when I do a put *, the wildcard isn't recognized. It 
 says:
 
 put *
 
 put: /software/src/lftp-4.4.14/src/*: No such file or directory

You have to use mput (and mget) command for wildcard expansion.

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


Re: [lftp] WebDAV issues with 4.4.14 against Apache/mod_dav

2014-01-13 Thread Alexander V. Lukyanov
On Mon, Jan 13, 2014 at 11:21:00PM -0500, Steve Caturan wrote:
 lftp web...@dav.pixi.me:/ rmdir dodo
 rmdir: File moved: 301 Moved Permanently (dodo - https://dav.pixi.me/dodo/)

This patch should fix the problem.

--
   Alexander.
diff --git a/src/Http.cc b/src/Http.cc
index 6262e35..1c7df26 100644
--- a/src/Http.cc
+++ b/src/Http.cc
@@ -701,10 +701,14 @@ void Http::SendRequest(const char *connection,const char 
*f)
   break;
 
case(REMOVE):
+  SendMethod(DELETE,efile);
+  Send(Depth: 0\r\n); // deny directory removal
+  break;
+
case(REMOVE_DIR):
+  if(efile.last_char()!='/')
+efile.append('/');
   SendMethod(DELETE,efile);
-  if(mode==REMOVE)
-Send(Depth: 0\r\n); // deny directory removal
   break;
 
case ARRAY_INFO:
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] LFTP script no longer working

2014-02-14 Thread Alexander V. Lukyanov
On Mon, Dec 30, 2013 at 08:09:42AM +0100, John Niendorf wrote:
 The problem is that starting last week, if I click on the launcher I
 made to run the script I get an error:

 delaying before reconnect...

Turn on debug to see what happens. It can be a problem on the server.

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


Re: [lftp] Suggestion for improvement for LFTP

2014-02-14 Thread Alexander V. Lukyanov
On Mon, Feb 03, 2014 at 02:59:07PM +0200, vasos g wrote:
 I am using to reliably upload files with a method I call mvrm. It
 merely consists of: a) upload to a staging area. b) move prod to a
 templocation c) move stage to prod. d) rm templocation. I suppose
 you can imagine possible uses of this. One thing that I suggest is
 to implement this feature, which is something involving a lot of
 work I suppose.

I think this operation can vary greatly and can be implemented as a script.

 Besides this, I can implement this behavior with a lftp script.
 Another thing that I need, in order to implement this behaviour via
 an lftp script is the ability to execute a group of commands
 conditionally when a command fails. I want this to happen not in a
 subshell (as the () because I want to call exit top.

Please try attached patch which improves exit behavoir and also
adds exit parent.

Thus these commands work as expected:
   ((echo aaa; exit) echo bbb)
   ((echo aaa; exit parent) echo bbb)
   ((echo aaa; exit top) echo bbb)

--
   Alexander.
diff --git a/src/CmdExec.cc b/src/CmdExec.cc
index abf50fb..faf68e3 100644
--- a/src/CmdExec.cc
+++ b/src/CmdExec.cc
@@ -822,12 +822,12 @@ void CmdExec::init(LocalDirectory *c)
Reconfig();
 }
 CmdExec::CmdExec(FileAccess *s,LocalDirectory *c)
-   : SessionJob(s?s:new DummyProto)
+   : SessionJob(s?s:new DummyProto), parent_exec(0)
 {
init(c);
 }
-CmdExec::CmdExec(const CmdExec *parent)
-   : SessionJob(parent-session-Clone())
+CmdExec::CmdExec(CmdExec *parent)
+   : SessionJob(parent-session-Clone()), parent_exec(parent)
 {
init(parent-cwd-Clone());
 }
diff --git a/src/CmdExec.h b/src/CmdExec.h
index 1f63346..752c4c7 100644
--- a/src/CmdExec.h
+++ b/src/CmdExec.h
@@ -69,6 +69,7 @@ public:
int  prev_exit_code;
 
 private:
+   CmdExec *parent_exec;
Buffer cmd_buf;
bool partial_cmd;
int alias_field; // length of expanded alias (and ttl for used_aliases)
@@ -176,7 +177,7 @@ public:
void SuspendJob(Job *j);
 
CmdExec(FileAccess *s,LocalDirectory *c);
-   CmdExec(const CmdExec *parent);
+   CmdExec(CmdExec *parent);
~CmdExec();
 
bool Idle();// when we have no command running and command buffer 
is empty
diff --git a/src/commands.cc b/src/commands.cc
index 34cdf91..72ab153 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -674,6 +674,11 @@ Job *CmdExec::builtin_exit()
 if(top)
exec=top.get_non_const();
   }
+  else if(!strcmp(a,parent))
+  {
+if(parent_exec)
+   exec=parent_exec;
+  }
   else if(!strcmp(a,kill))
   {
 kill=true;
@@ -699,9 +704,11 @@ Job *CmdExec::builtin_exit()
   detach=true;
if(kill)
   Job::KillAll();
-   if(detach)
+   if(detach) {
+  for(CmdExec *e=this; e!=exec; e=e-parent_exec)
+e-Exit(code);
   exec-Exit(code);
-   else {
+   } else {
   int loc=0;
   exec-SetAutoTerminateInBackground(true);
   eprintf(_(
@@ -733,6 +740,7 @@ void CmdExec::Exit(int code)
 {
while(feeder)
   RemoveFeeder();
+   cmd_buf.Empty();
if(interactive)
{
   ListDoneJobs();
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] fsetstat with sftp and verion 4.3.3

2014-03-04 Thread Alexander V. Lukyanov
On Fri, Feb 21, 2014 at 02:50:39PM +0100, Eisenblätter, Mark wrote:
 but i was note able  to get rid of the fsetstat call, which fails.

I think the main problem is the CLOSE operation which also fails:

 --- sending a packet, length=13, type=4(CLOSE), id=23
 --- got a packet, length=24, type=101(STATUS), id=23
  status code=4(Failure), message=Failure

The result of FSETSTAT is actually ignored by lftp.

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


Re: [lftp] string of commands and lftp output

2014-03-11 Thread Alexander V. Lukyanov
On Tue, Mar 11, 2014 at 06:07:59AM -0400, Robert DuToit wrote:
 Where in the code would I look for the switch be that turns down the verbose 
 levels?  

You can take a look at:

bool Log::WillOutput(int l)
void MirrorJob::va_Report(const char *fmt,va_list v)

also you can try:

set cmd:verbose yes
set cmd:interactive yes

-- 
   Alexander.


 On Mar 11, 2014, at 4:42 AM, Alexander Lukyanov lavv...@gmail.com wrote:
 
  In non-interactive mode there are fewer diagnostic messages. Also mirror 
  checks if lftp is in the foreground process group of FD 1 before writing 
  verbose messages.
  
  -- 
 Alexander.
  
  
  2014-02-24 8:05 GMT+04:00 Robert DuToit rdut...@comcast.net:
  Hi Alexander,
  
  a footnote also: The commands are running fine but still not getting any 
  upload stats but more importantly the log file isn’t updating till the very 
  end of the session so I can’t monitor the progress in the UI.
  
  Thanks,  Rob
  
  
  
  ___
  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] Questions about LFTP

2014-03-12 Thread Alexander V. Lukyanov
On Wed, Mar 12, 2014 at 02:17:51PM +0800, peng li wrote:
 Hello, very thank you for your application development, when I was in the
 use of LFTP, there is an argument I don't know what is the format, you can
 tell me, because I did not find relevant explanation on the Internet
 
   *mirror  *-N,  --newer-than=SPEC download only files
 newer than specified time
 
  --older-than=SPEC download only files
 older than specified time

From the man page:

   For options --newer-than and --older-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.

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


Re: [lftp] Can't connect to FreeBSD sftp

2014-03-13 Thread Alexander V. Lukyanov
On Tue, Mar 11, 2014 at 03:20:53PM +0100, Michael Ross wrote:
 read(8,x...@www.ross.cx's password:...,65536) = 33 (0x21)

 read(8,Password for root@lftp:,65536)= 23 (0x17)

So the prompt is different. I suspect that lftp did not recognize the second
prompt for password. I'll have to fix it.

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


Re: [lftp] Can't connect to FreeBSD sftp

2014-03-14 Thread Alexander V. Lukyanov
On Thu, Mar 13, 2014 at 12:17:29PM +0400, Alexander V. Lukyanov wrote:
 On Tue, Mar 11, 2014 at 03:20:53PM +0100, Michael Ross wrote:
  read(8,x...@www.ross.cx's password:...,65536) = 33 (0x21)
 
  read(8,Password for root@lftp:,65536)  = 23 (0x17)
 
 So the prompt is different. I suspect that lftp did not recognize the second
 prompt for password. I'll have to fix it.

Please review or test this patch.

-- 
   Alexander.
diff --git a/src/SSH_Access.cc b/src/SSH_Access.cc
index 7ae3e6b..68e64de 100644
--- a/src/SSH_Access.cc
+++ b/src/SSH_Access.cc
@@ -43,13 +43,16 @@ int SSH_Access::HandleSSHMessage()
if(!eol)
{
   const char *p=password:;
+  const char *p_for=password for ;
   const char *y=(yes/no)?;
   int p_len=strlen(p);
+  int p_for_len=strlen(p_for);
   int y_len=strlen(y);
   if(s0  b[s-1]==' ')
 s--;
   if((s=p_len  !strncasecmp(b+s-p_len,p,p_len))
-  || (s10  !strncmp(b+s-2,':,2)))
+  || (s10  !strncmp(b+s-2,':,2))
+  || (sp_for_len  b[s-1]==':'  !strncasecmp(b,p_for,p_for_len)))
   {
 if(!pass)
 {
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp stuck at Getting directory content (51558960) [receiving data]

2014-03-27 Thread Alexander V. Lukyanov
On Thu, Mar 27, 2014 at 11:40:25AM +0100, nopleasenospam wrote:
 Now I have a problem with a folder containing +380 000 files, it is stuck
 at:

 Getting directory content (51558960) [receiving data]

 And it's like that since 10 hours.

Do you use the latest stable lftp version? (4.4.15)

Try to run strace -p PID where PID is that of lftp process.
If it shows nothing, run gdb /usr/bin/lftp PID and type info stack.
Also try top and see what is the state of lftp process.

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


Re: [lftp] lftp stuck at Getting directory content (51558960) [receiving data]

2014-03-27 Thread Alexander V. Lukyanov
On Thu, Mar 27, 2014 at 03:41:53PM +0400, Alexander V. Lukyanov wrote:
 If it shows nothing, run gdb /usr/bin/lftp PID and type info stack.

pstack PID is a simpler command for this.

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


Re: [lftp] lftp find command and patterns/asterisk

2014-04-18 Thread Alexander V. Lukyanov
On Tue, Apr 15, 2014 at 11:21:30AM +, tilo.mue...@bertelsmann.de wrote:
 Hi,
 we want to exit lftp processing, when a file pattern is not matching.
 This exits with RC=8, if no hugo.xml file is present:
 find hugo.xml || exit 8;

find command expects a directory to dive into in the command line.
Currently it cannot find a file by name, you can use grep for that.

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


Re: [lftp] segmentation fault

2014-06-02 Thread Alexander V. Lukyanov
On Sat, May 31, 2014 at 09:02:10AM +0400, 6bx2 wrote:
 For unknown reason downloading of torrent data freeze on 48%.
 Verification ends with segmentation fault.

 lftp :~ torrent V_nachale_slavnyh_del_1980_DVDRip_ot_Files-x.torrent
 Ошибка сегментации: 11_DVDRip_ot_Files-x: Проверка: 327/701 (46%)

 lftp 4.4.15.

Please try 4.5.0 or compile lftp with debug (configure --with-debug) and
run it under gdb to get a stack trace. Also turn on debug in lftp (command
debug).

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


Re: [lftp] Segmentation fault in lftp-4.5.0

2014-06-02 Thread Alexander V. Lukyanov
On Tue, May 27, 2014 at 11:11:46AM +1100, Michael Uleysky wrote:
 Segmentation error when ftp mirroring.

It should be fixed in just released 4.5.1. Please try.

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


Re: [lftp] LFTP retry behavior when a file is not present

2014-06-02 Thread Alexander V. Lukyanov
On Tue, Apr 08, 2014 at 04:46:15PM -0400, Miller-Jacobson, Ben wrote:
 One of my coworkers recently encountered a problem in one of our scripts
 where the script would apparently hang after first being moved to a new
 machine in which the none of the old files it was supposed to move were yet
 present. We tracked it down to LFTP apparently not finding the file it is
 looking for and retrying indefinitely. Reviewing the man page, this looks
 like the expected behavior. However, it was not what we were expecting and
 in our case and a number of other plausible use cases not what is desired.
 It occurs to me that an option to disable retries or perhaps set a maximum
 number of retries might be a nice feature to add, if it doesn't already
 exist. We've got a fix for our issue, but this might be useful for other
 cases where reporting a failure is better than retrying indefinitely,
 especially for use in scripts where there isn't going to be someone around
 to kill the process.

Please turn on debug in lftp (command debug) and see the protocol messages.
FYI, 4xx codes in FTP protocol are transient, so lftp retries on them.
To limit the number of retries change the setting net:max-retries.

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


Re: [lftp] {Disarmed} Problem lftp towards Axway Synchrony Gateway

2014-06-02 Thread Alexander V. Lukyanov
On Thu, Apr 17, 2014 at 11:55:46AM +0200, Laurent Chartinier wrote:
 I have an SFTP server hosted by Axway Synchrony Gateway. For connecting to
 this server, we use user/password.
 I can connect to my server with WinSCP, FileZilla and lftp 4.0.9 (RHEL 6.5).
 With lftp 4.4.8, i have an error :
 
 $ lftp -u'snated,*' sftp://srv-dmz1:6321
 lftp snated@srv-dmz1:~ debug 19;
 lftp snated@srv-dmz1:~ ls
 FileCopy(0x2004d270) enters state INITIAL
 FileCopy(0x2004d270) enters state DO_COPY
  attempt number 0
  attempt number 1
  Exécution du programme de connexion (ssh -a -x -s -l snated -p 6321
 srv-dmz1 sftp)
 --- sending a packet, length=5, type=1(INIT), id=0
 PackUINT32BE(0x0005)
 PackUINT8(0x01)
 PackUINT32BE(0x0006)
 --- Received disconnect from 10.0.9.7: 1: ssh disconnect host not allowed to 
 connect
  Connexion interrompue par le tiers

I don't see any prompt for password from ssh. What happens when you run ssh by 
hand?

 When I check my SFTP Server log, it's like lftp don't send password :
SFTP Connection Request Received
login=snated,pwd=.
Connection Failure, reason : Invalid SFTP Login Password.
 
 I check with lftp 4.0.9 and the server log contains an masked password :
SFTP Connection Request Received
login=snated,pwd=###.
...

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


Re: [lftp] lftp 3.5.0+ segfault

2014-06-06 Thread Alexander V. Lukyanov
On Wed, Jun 04, 2014 at 09:15:44PM -0500, MIS Center wrote:
 I'm experiencing a segfault when just invoking the lftp command, on
 RHEL5-32/64 and RHEL6-32/64, starting with version 3.5.0, then 3.5.1

Please try the latest snapshot: 
http://lftp.yar.ru/ftp/devel/lftp-4.5.1.20140606.tar.gz

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


Re: [lftp] lftp and patterns

2014-06-10 Thread Alexander V. Lukyanov
On Tue, Jun 10, 2014 at 08:41:04AM +, tilo.mue...@bertelsmann.de wrote:
 Hi Alexander,
 yep, we’ve already tried cls before. But regarding the exit code, it works 
 the same as ls.

You can use temporary files like this:

lftp cls *.csv  listing
lftp source -e test -s listing  echo LFTP-COMMAND

It's not pretty, but works...

You can also try attached patch, which adds this possibility:

glob .empty *.csv  echo There are no *.csv files

Suggestions on the command name are welcome (it's not released yet).

-- 
   Alexander.
diff --git a/src/commands.cc b/src/commands.cc
index e77d211..695c6cf 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -92,6 +92,8 @@ CMD(at);CMD(find);   CMD(command); CMD(module);
 CMD(lpwd);  CMD(glob);  CMD(chmod);   CMD(queue);
 CMD(repeat);CMD(get1);   CMD(tasks);   CMD(torrent);
 
+CMD(empty); CMD(true); CMD(false);
+
 #ifdef MODULE_CMD_MIRROR
 # define cmd_mirror 0
 #endif
@@ -489,6 +491,9 @@ const struct CmdExec::cmd_rec CmdExec::static_cmd_table[]=
 N_(Same as more, but filter each file through bzcat\n)},
 
{.tasks,  cmd_tasks,  0,0},
+   {.empty,  cmd_empty,  0,0},
+   {.true,   cmd_true,   0,0},
+   {.false,  cmd_false,  0,0},
 };
 const int 
CmdExec::static_cmd_table_length=sizeof(static_cmd_table)/sizeof(static_cmd_table[0]);
 
@@ -3348,6 +3353,22 @@ CMD(tasks)
return 0;
 }
 
+CMD(empty)
+{
+   exit_code=(args-count()1 ? 1 : 0);
+   return 0;
+}
+CMD(true)
+{
+   exit_code=0;
+   return 0;
+}
+CMD(false)
+{
+   exit_code=1;
+   return 0;
+}
+
 CMD(eval)
 {
int opt;
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp Exit code when using mget

2014-06-10 Thread Alexander V. Lukyanov
On Tue, Jun 10, 2014 at 12:38:06PM +, tilo.mue...@bertelsmann.de wrote:
 OK, thanks for the suggestion with the mirror command. I think it will work 
 this way.
 
 Anyway, my suggestion: Maybe this could be implemented with an global lftp 
 switch which affects all protocols:
 xfer:mget-error-no-file
 
 If set to false, it doesn’t throw an error when no file is found. And the 
 default is true (as it works today).

The next version will have this:

glob --exist *  mget *

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


Re: [lftp] certificated validation

2014-06-11 Thread Alexander V. Lukyanov
On Wed, Jun 11, 2014 at 01:55:23AM +0200, Szépe Viktor wrote:
 Could you help me how to solve to Not trusted: no issuer was found error?
 Maybe lftp cannot parse ca-certificates.crt? (Debian wheezy)
 4.5.1 does the same.
 Also with fresh ca bundle
 https://github.com/bagder/ca-bundle/blob/master/ca-bundle.crt

 You can try running  lftp eu1.solid-hosting.net  yourself without a password.

 Thank you!


 openssl says it is OK

You can try to compile lftp with openssl (configure --with-openssl) and see if 
it helps.

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


[lftp] lftp 4.5.2

2014-06-11 Thread Alexander V. Lukyanov
lftp-4.5.2 has been released. Changes:

* fixed a coredump on startup when compiled with certain gcc versions.
* mkdir -q option for quiet operation.
* glob --exist and --not-exist options.
* improved torrent status, show piece availability statistics.
* remove unconnectable torrent peers on trackerless torrents.

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

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


Re: [lftp] lftp 4.5.1 Segmentation fault on CentOS 6.5

2014-06-11 Thread Alexander V. Lukyanov
On Tue, Jun 10, 2014 at 09:33:33AM -0500, Heath Skarlupka wrote:
 After compiling lftp 4.5.1 on a CentOS 6.5 x86_64 box, the lftp command
 segfaults before the lftp prompt shows up on the command line.  I recompiled

Thanks for the report! This problem is fixed in just released lftp 4.5.2.

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


Re: [lftp] issue with SITE commands and retries

2014-06-11 Thread Alexander V. Lukyanov
On Tue, Jun 10, 2014 at 10:58:12AM +0200, Mattias Bergvall wrote:
 I have an issue with LFTP (Version 4.4.15) when it comes to “misbehaving”
 mainframe remote sites.
 The problem occurs when the FTP server/proxy  (IBM FTP CS V1R13) fails to
 get exclusive permissions to the target dataset (file).
 The server then issues a 125 message and terminates the connection. (Which
 I think is incorrect behavior, but that's not the point).

 What happens next is that lftp reconnects again (I have net:max-retries =
 1. I don’t want it to retry!) and does NOT issue the SITE commands that

The problem with retries should be fixed in 4.5.2.

You can also try this patch for 4.5.2 which adds ftp:site setting for
tuning the connection after login. For your case it would be

   set ftp:site SBD=(IBM-278,ISO8859-1)  LRECL=240  RECFM=FB

(note the double spaces).

--
   Alexander.
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
index aa4cf6a..44be63d 100644
--- a/src/ftpclass.cc
+++ b/src/ftpclass.cc
@@ -1559,6 +1559,7 @@ int   Ftp::Do()
 TuneConnectionAfterFEAT();
   SendSiteGroup();
   SendSiteIdle();
+  SendSiteCommands();
 
   if(!home_auto)
   {
@@ -2648,6 +2649,23 @@ void Ftp::SendSiteGroup()
conn-SendCmd2(SITE GROUP,group);
expect-Push(Expect::IGNORE);
 }
+void Ftp::SendSiteCommands()
+{
+   const char *site_commands=QueryStringWithUserAtHost(site);
+   if(!site_commands)
+  return;
+   char *cmd=alloca_strdup(site_commands);
+   for(;;) {
+  char *sep=strstr(cmd,  );
+  if(sep)
+*sep=0;
+  conn-SendCmd2(SITE,cmd);
+  expect-Push(Expect::IGNORE);
+  if(!sep)
+break;
+  cmd=sep+2;
+   }
+}
 
 void Ftp::SendArrayInfoRequests()
 {
diff --git a/src/ftpclass.h b/src/ftpclass.h
index c83c208..d762086 100644
--- a/src/ftpclass.h
+++ b/src/ftpclass.h
@@ -327,6 +327,7 @@ private:
voidSendSiteIdle();
voidSendAcct();
voidSendSiteGroup();
+   voidSendSiteCommands();
voidSendUTimeRequest();
void SendAuth(const char *auth);
void TuneConnectionAfterFEAT();
diff --git a/src/resource.cc b/src/resource.cc
index 6f63ed7..4aa071a 100644
--- a/src/resource.cc
+++ b/src/resource.cc
@@ -181,6 +181,7 @@ static ResType lftp_vars[] = {
{ftp:fxp-passive-source,   no,
ResMgr::BoolValidate,ResMgr::NoClosure},
{ftp:fxp-passive-sscn, yes,   
ResMgr::BoolValidate,ResMgr::NoClosure},
{ftp:home, ,  0,0},
+   {ftp:site  ,  0,0},
{ftp:site-group,   ,  0,0},
{ftp:lang, ,  0,0},
{ftp:list-empty-ok,no,0,0},
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Mirror to remote except particular folder present on remote

2014-06-19 Thread Alexander V. Lukyanov
On Thu, Jun 19, 2014 at 09:15:11PM +0900, Nicolas Raoul wrote:
 Hello all,
 
 I usually edit my website locally and push it with this command:
 
 lftp -u user,password host -e mirror -c -e -R -x ^\.git/$ my /my; exit
 
 But now, my website dynamically adds data to the /my/data/ folder.
 
 I don't have this /my/data folder locally.
 
 *QUESTION:* How to push without deleting/overwriting /my/data and its
 content?

Just exclude the folder using -x ^data/ option.

If you need to upload some local files into that folder, use two mirrors,
one without -e option just for my/data folder.

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


[lftp] lftp 4.5.3

2014-07-06 Thread Alexander V. Lukyanov
lftp-4.5.3 has been released. Changes:

* new setting ftp:site.
* don't uncompress http body when Contrent-Type is compressed.
* check source address of DHT replies.
* discard disconnected torrent peers only after a timeout.

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

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


Re: [lftp] additional: Is the package known to compile on AIX(gcc) or AIX(xlc)?

2014-07-09 Thread Alexander V. Lukyanov
On Mon, Jul 07, 2014 at 01:13:06PM +0800, liweiyang wrote:
 Attached my config.log ,ths.

You have to install g++:

g++ -o conftest -O  -D_THREAD_SAFE  -s conftest.cpp  5
g++:  not found

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


Re: [lftp] mirror with transfers ordered by date

2014-07-09 Thread Alexander V. Lukyanov
On Mon, Jun 30, 2014 at 07:12:16PM -0300, Carlos Colombo wrote:
 Hi,
 How can I use lftp to mirror a site doing transfers of older files prior
 to newer files.

It is not possible now. Mirror sorts the files by name.

 I am thinking on writing a script to queue individual transfers using
 the output from crls --sort=date command ?
 
 Any ideas?
 I would also like to do n transfers in parallel.

cmd:parallel setting can be helpful here.

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


Re: [lftp] mirror with transfers ordered by date

2014-07-10 Thread Alexander V. Lukyanov
On Wed, Jul 09, 2014 at 11:05:53AM +0400, Alexander V. Lukyanov wrote:
 On Mon, Jun 30, 2014 at 07:12:16PM -0300, Carlos Colombo wrote:
  Hi,
  How can I use lftp to mirror a site doing transfers of older files prior
  to newer files.

 It is not possible now. Mirror sorts the files by name.

I have implemented mirror:sort-by setting. You can try it by fetching 
development
sources from git repository:

   git clone git://github.com/lavv17/lftp.git

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


[lftp] lftp 4.5.4

2014-08-06 Thread Alexander V. Lukyanov
lftp-4.5.4 has been released. Changes:

* new setting mirror:sort-by (name, size, date).
* torrent: reduced cpu and memory usage.
* fixed occasional BUG:deadlock message.
* fixed a segfault when a directory contains duplicate file names.
* fixed a memory leak in torrent.
* fixed byte counters in mirror --depth-first.
* fixed timeout checks in FISH.
* translations updated (pl).

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

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


Re: [lftp] lftp 4.5.4

2014-08-11 Thread Alexander V. Lukyanov
On Mon, Aug 11, 2014 at 09:22:16AM +0200, Mattias Bergvall wrote:
 I wonder how to prevent retries and to make LFTP fail-exit on connection
 problems (when the server is down, for instance).

Please try this patch.

-- 
   Alexander.
diff --git a/src/FileAccess.cc b/src/FileAccess.cc
index 7582e4f..1b13074 100644
--- a/src/FileAccess.cc
+++ b/src/FileAccess.cc
@@ -59,6 +59,7 @@ void FileAccess::Init()
pos=0;
mode=CLOSED;
retries=0;
+   max_retries=0;
opt_date=0;
opt_size=0;
fileset_for_info=0;
@@ -192,7 +193,6 @@ void FileAccess::Close()
opt_size=0;
fileset_for_info=0;
retries=0;
-   max_retries=0;
entity_size=NO_SIZE;
entity_date=NO_DATE;
ascii=false;
diff --git a/src/NetAccess.cc b/src/NetAccess.cc
index 2316579..18a9fdd 100644
--- a/src/NetAccess.cc
+++ b/src/NetAccess.cc
@@ -317,17 +317,20 @@ bool NetAccess::NextTry()
 reconnect_interval_current=reconnect_interval_max;
}
retries++;
+   LogNote(10,attempt number %d (max_retries=%d),retries,max_retries);
return CheckRetries();
 }
 bool NetAccess::CheckRetries()
 {
if(max_retries0  retriesmax_retries)
{
-  Fatal(_(max-retries exceeded));
+  if(!IsConnected()  last_disconnect_cause)
+Fatal(xstring::cat(_(max-retries exceeded), 
(,last_disconnect_cause.get(),),NULL));
+  else
+Fatal(_(max-retries exceeded));
   return false;
}
reconnect_timer.Set(reconnect_interval_current);
-   LogNote(10,attempt number %d,retries);
return true;
 }
 void NetAccess::TrySuccess()
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] FW: lftp output

2014-08-11 Thread Alexander V. Lukyanov
On Sat, Aug 09, 2014 at 06:48:06PM +0100, Jorge Mendes wrote:
 Those 5 errors are file size decreased during transfer. It's weird because
 its not correct, all transfers are good.

Please check the version of lftp. Such an error was fixed in 4.4.13 (the
bug existed in 4.4.12). If possible, upgrade to the latest version 4.5.4.

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


Re: [lftp] Compilation errors with lftp 4.5.4

2014-08-19 Thread Alexander V. Lukyanov
On Mon, Aug 11, 2014 at 02:21:02PM -0500, Andrew Reis wrote:
 Receiving the following errors that are stopping compilation: 
 
 lftp_ssl.cc: In constructor 'lftp_ssl_openssl::lftp_ssl_openssl(int,
 lftp_ssl_base::handshake_mode_t, const char*)':
 lftp_ssl.cc:835: error: 'SSL_set_tlsext_host_name' was not declared in
 this scope 

 openssl version
 openssl 0.9.8e-el5 

I think this old openssl does not define that function. You can either
upgrade openssl, compile without openssl or with GNU TLS, or comment out
the line lftp_ssl.cc:835 with the function call - it is not critically
needed.

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


Re: [lftp] lftp enhancement request: command line option to inhibit loading of ~/.lftprc

2014-08-19 Thread Alexander V. Lukyanov
On Sat, Aug 09, 2014 at 02:06:57PM +0200, Andreas Luik wrote:
   I would like to propose a small enhancement for lftp: I use it from a 
 cron-Job
 and was looking for a way to inhibit loading of (user specific-) settings from
 the ~/.lftprc or ~/.lftp/rc to make sure that settings in these file do not
 (inadvertetly) influence the background job(s).  Other programs often
 have a command line option to do so, but unfortunately lftp lacks it.

Please see 
https://github.com/lavv17/lftp/commit/3de6e7eb3b11ed67ab03839fcaaea17fc0b74c70

It adds the --norc option (will be available in lftp-4.5.5).

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


[lftp] lftp 4.5.5

2014-09-04 Thread Alexander V. Lukyanov
lftp-4.5.5 has been released. Changes:

* added support for internationalized domain names.
* added lftp --norc option.
* added mirror Finished message.
* added ftp:catch-size setting.
* fixed net:max-retries setting.
* fixed byte counters in mirror status.
* fixed a segfault in ftps.
* fixed a spurious error message in fxp and ftp.


Get it from http://lftp.yar.ru/get.html or your favorite mirror.

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


Re: [lftp] lftp 4.5.5

2014-09-04 Thread Alexander V. Lukyanov
On Fri, Sep 05, 2014 at 12:52:10AM +0200, Juan Simón wrote:
 What is the meaning of this change 'added mirror Finished message'?

Now mirror writes another messages when a transfer finishes, something like

   Finished transfer `path/file' (100 Kb/s)

when verbose=2.

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


Re: [lftp] feature request: ls sorting by time (and possibly the other columns?)

2014-09-04 Thread Alexander V. Lukyanov
On Thu, Sep 04, 2014 at 11:06:25PM -0400, Dan39 wrote:
 I would like to be able to sort the output of ls by the last modified
 time column.
 
 It looks like by default it is sorted by name, which I think is
 actually just how the ftpd returns it when doing LIST. Is there
 currently no mechanism in lftp for parsing/sorting the file list? With

Yes, there is cls command just for that.

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


Re: [lftp] lftp 4.5.5

2014-09-05 Thread Alexander V. Lukyanov
On Thu, Sep 04, 2014 at 04:08:53PM +0400, Alexander V. Lukyanov wrote:
 lftp-4.5.5 has been released. Changes:
 
 * added support for internationalized domain names.
 * added lftp --norc option.
 * added mirror Finished message.
 * added ftp:catch-size setting.
 * fixed net:max-retries setting.
 * fixed byte counters in mirror status.
 * fixed a segfault in ftps.
 * fixed a spurious error message in fxp and ftp.
 
 
 Get it from http://lftp.yar.ru/get.html or your favorite mirror.

Binaries for Fedora 19 (i686 and x86_64) are now available.

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


Re: [lftp] Why is PROT P issued twice?

2014-09-08 Thread Alexander V. Lukyanov
On Mon, Sep 08, 2014 at 07:30:53PM -0400, Stephen Powell wrote:
 On Mon, 08 Sep 2014 03:53:13 -0400 (EDT), Alexander Lukyanov wrote:
  Please send the debug log (use command debug to turn it on).

 For security reasons I have redacted or changed some things,
 such as userids, passwords, domain names, IP addresses, etc.
 This keeps me employed.  This is lftp version 4.5.4, Readline 6.3,
 GnuTLS 3.3.6, zlib 1.2.8.

Thanks! Here is a patch to fix the problem.

--
   Alexander.
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
index 00a4f28..5d7fbc8 100644
--- a/src/ftpclass.cc
+++ b/src/ftpclass.cc
@@ -1610,7 +1610,8 @@ int   Ftp::Do()
 
   if(expect-Has(Expect::FEAT)
   || expect-Has(Expect::OPTS_UTF8)
-  || expect-Has(Expect::LANG))
+  || expect-Has(Expect::LANG)
+  || expect-Has(Expect::PROT))
 goto usual_return;
 
 #if USE_SSL
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] Why is PROT P issued twice?

2014-09-10 Thread Alexander V. Lukyanov
On Tue, Sep 09, 2014 at 09:37:16PM -0400, Stephen Powell wrote:
 But now I'm having a different problem, which I don't think I was
 having before.  It appears to be trying to close the control socket
 twice.  Or maybe it's just printing out garbage from a message
 buffer that it shouldn't be printing.  (I've also upgraded to
 lftp 4.5.5, by the way.)  Here is what the tail end of the debug
 output looks like now:

 -

  Got EOF on data connection
  Closing data socket
 --- 226 Transfer complete.
 --- QUIT
  Closing control socket
 ng control socket
 Goodbye.
  Closing control socket
 t

 -

Looks like garbage after end of the string. I'll look into the problem.

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


Re: [lftp] lftp does not wait for 221 Goodbye message before closing control connection

2014-09-15 Thread Alexander V. Lukyanov
On Fri, Sep 12, 2014 at 07:06:02PM -0400, Stephen Powell wrote:
 With set ftp:use-quit yes in effect, which is the default value for this 
 option,
 lftp will issue the QUIT command to the server in response to an lftp close
 command.  But lftp does not wait for the server to respond with the 221 
 Goodbye
 message before closing the control connection.  Sometimes, the message arrives
 before lftp can get the control connection closed, and sometimes it doesn't.
 This results in inconsistent debug output.  If the server is broken, and 
 doesn't
 send the 221 Goodbye message, a timeout should eventually occur, of course,
 and the control connection can then be closed.  Or the problem can be 
 circumvented
 by using the set ftp:use-quit no command.  But if you're going to issue the
 QUIT command, you really should wait a reasonable amount of time for a 
 response,
 for consistency.  Failing to wait for a response may also cause problems for 
 the
 server, if it does not recover well from an error in sending the 221 message.

As far as I can tell, lftp does not wait for QUIT reply only when it exits.
Is it really necessary to linger at exit to wait for clean connection shutdown?

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


Re: [lftp] FTP'ing files to server, then renaming them.

2014-09-18 Thread Alexander V. Lukyanov
On Wed, Sep 10, 2014 at 04:01:59PM +0100, jane highland wrote:
 Is there a way within LFTP to either send up a number of files up to an FTP 
 server, then change their extension (from say .temp) to something else like 
 .data

Please try development snapshot 
http://lftp.yar.ru/ftp/devel/lftp-4.5.5.20140918.tar.gz
It has support for transfers via a temporary file, use set xfer:use-temp-file 
yes.
I have used .in. prefix, like an old mirror program did.

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


Re: [lftp] Status for incomplete files

2014-09-19 Thread Alexander V. Lukyanov
On Fri, Sep 19, 2014 at 01:36:18AM +0530, akshay gupta wrote:
 I am looking for a way to know the file is still getting transferred and is
 incomplete. Some file downloaders  append some token such as _tmp or
 something else to the file name until its getting transferred when the file
 transfer completes its renamed to its original name. I know about pget
 option which creates a *lftp-pget-status* file but I prefer more direct
 option.

Please try development snapshot
   http://lftp.yar.ru/ftp/devel/lftp-4.5.5.20140918.tar.gz
with xfer:use-temp-file set to yes.

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


Re: [lftp] lftp does not wait for 221 Goodbye message before closing control connection

2014-09-22 Thread Alexander V. Lukyanov
On Mon, Sep 22, 2014 at 10:02:29PM -0400, Stephen Powell wrote:
 I tried setting both of these server options to yes and tried my get with
 lftp again.  The last few lines of output in the debug file are now as 
 follows:

  Got EOF on data connection
  Closing data socket
 --- 426 Failure writing network stream.
  received all data but no EOF

Please test this change.

--
   Alexander.
diff --git a/src/ftpclass.cc b/src/ftpclass.cc
index 4693475..1c37a13 100644
--- a/src/ftpclass.cc
+++ b/src/ftpclass.cc
@@ -2406,6 +2406,7 @@ int   Ftp::Do()
 if(conn-data_iobuf-Size()==0  conn-data_iobuf-Eof())
 {
LogNote(9,Got EOF on data connection);
+   conn-data_iobuf-PutEOF(); // for ssl shutdown
DataClose();
if(expect-IsEmpty())
{
___
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp


Re: [lftp] lftp does not wait for 221 Goodbye message before closing control connection

2014-09-29 Thread Alexander V. Lukyanov
On Mon, Sep 29, 2014 at 08:57:23PM -0400, Stephen Powell wrote:
  
  I cannot reproduce it. Please use strace on the lftp process, also use
  pstack PID on it and send me the output.
 
 I can reproduce the problem if I run the lftp command directly at a
 shell prompt, but if I run the lftp command under strace, I cannot
 reproduce it.  How aggravating!  Perhaps this is a timing problem, and
 running the command under strace introduces just enough delay to eliminate
 the problem.  Also, I cannot use pstack because pstack is not available
 for the machine architecture that I am running on.

You can use gdb instead of pstack:

$ gdb lftp PID
...attached...
(gdb) bt

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


Re: [lftp] lftp does not wait for 221 Goodbye message before closing control connection

2014-10-03 Thread Alexander V. Lukyanov
On Fri, Oct 03, 2014 at 06:31:59AM -0400, Stephen Powell wrote:
 On Tue, 30 Sep 2014 01:14:23 -0400 (EDT), Alexander V. Lukyanov wrote:
 
  You can use gdb instead of pstack:
 
  $ gdb lftp PID
  ...attached...
  (gdb) bt

 OK, here's the results from using gdb, but I don't know how useful it is.
 There's a lot of ?? labels.  As a review, I enter lftp with no options
 and get an lftp command prompt.  I then enter commands like this

Fortunately, I could reproduce the bug. It's fixed now in the git repository.
The relevant change: 
https://github.com/lavv17/lftp/commit/373878e89ce67d10f36291e9c13b39b57ff3a1be

Thanks!

--
   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


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


[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:1036E2211338395ED405DFD2E1A7C0E250B84787xl=2626600dn=lftp-4.6.0.tar.gz
   
magnet:?xt=urn:btih:C3ACE41CC267CA4CB61788E26CB192247DC05200xl=2618661dn=lftp-4.5.6.tar.gz
   
magnet:?xt=urn:btih:0BFE6089110E19607C3B6A53F7AF1F1F4E44D442xl=671392dn=lftp-4.6.0-1.x86_64.rpm
   
magnet:?xt=urn:btih:FA79A16118782CE5818B742E1209686B8BA76083xl=667412dn=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] 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


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] 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] 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 l...@netis.ru
 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] 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 lavv...@gmail.com
 wrote:
 
  Can you provide a debug log? Why lftp cannot replace the old file?
 
  2014-10-27 10:44 GMT+03:00 akshay gupta akshaygupta...@gmail.com:
 
  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] 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-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-29 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 l...@netis.ru:

 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] 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] 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] 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-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 l...@netis.ru 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] 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 franck+l...@nospam.yrnm.net
 mailto:franck+l...@nospam.yrnm.net:
 
 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 mailto: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


[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] 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 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


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 `tmp-file`
!rm -f tmp-file

-- 
   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] [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] 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] 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] 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] 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 lavv...@gmail.com wrote:
 
  Which protocol do you use?
 
  вт, 24 февр. 2015, 13:48, akshay gupta akshaygupta...@gmail.com:
 
  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] [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] 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 guilhermecgss...@gmail.com
 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] 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 l...@netis.ru:
 
 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] 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] 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


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] 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 l...@netis.ru:
 
  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 lavv...@gmail.com:
  
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 deced...@gmail.com:
   
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] 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


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] "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] --size-range=RANGE examples?

2016-06-14 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] 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


[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


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 <nathan.sut...@gmail.com>
> 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 <l...@netis.ru>
> > 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] [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 <deced...@gmail.com>:
>
> > 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 <l...@netis.ru>:
> >
> >> 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


<    5   6   7   8   9   10   11   12   13   14   >