alexander.palisek | 7 Feb 12:54 2006

APPE command needed

Hello everyone,

we are replacing our current ftp client with lftp, in some batch scripts.
Most things work very good, but there are some troubles, too.
At the moment, we are missing the APPE command, to append data to
already existing files on the remote end. The append function is used in
uploads to the mainframe today.

Would it be an complex task to implement the append command in lftp?
As I understood the APPE function, this is rather handled on the ftp server
side, than at the client, as it has to append to the file instead of
overwriting.
So hopefully, this could be an easy enhancement to lftp.

Regards,
Alexander

PS: am I at the correct list for these questions? Or should I rather post to
the developer list?

***************************************************************************
Diese Information und eventuelle Anhaenge sind vertraulich 
und ausschliesslich zur Kenntnisnahme durch den oder die 
genannten Adressaten bestimmt. Sollten Sie nicht der 
vorgesehene Adressat sein, ersuchen wir Sie, uns unverzueglich 
zu informieren und die Nachricht zu loeschen. Der Inhalt der 
fehlgeleiteten Nachricht darf weder aufgezeichnet noch 
Unbefugten mitgeteilt oder fuer irgendwelche Zwecke verwertet 
werden. Bitte beachten Sie weiters, dass trotz hoechstmoeglicher 
Sorgfalt unsererseits aufgrund der technischen Gegebenheiten 
(Continue reading)

Vishwanath Patil | 8 Feb 13:13 2006
Picon

lftp - modules

At the outset i would like to tell everyone who uses and trusts
lftp.... Its a very good tool and i have been using this from last 3
months.

i was looking for the following
1. a reliable ftpclient
2. a small footprint ftpclient
3. ftpclient that can download at a set rate
4. ftpclient that can start the work at given time
5. pause and resume the downloads

and all these features are available with lftp

i want to use lftp as a back-end that downloads files from a ftp
server at a particular time with particular rate. The issue now is i
want to integrate this into another piece of application or control it
from that application. I tried using shared memory and diverted the
readline to shared memory. Now i can give any command from there and
lftp executed it.

But i think i dont need to add this or i feel that this is not the
best way. Can i use the .so files to call the functions and reach my
requirement. I want to know how to compile and link the example files
in the src directory.

thanks

vishwanath patil

(Continue reading)

Alexander V. Lukyanov | 8 Feb 13:49 2006
Picon

Re: lftp - modules

On Wed, Feb 08, 2006 at 05:43:25PM +0530, Vishwanath Patil wrote:
> i want to use lftp as a back-end that downloads files from a ftp
> server at a particular time with particular rate. The issue now is i
> want to integrate this into another piece of application or control it
> from that application. I tried using shared memory and diverted the
> readline to shared memory. Now i can give any command from there and
> lftp executed it.

> But i think i dont need to add this or i feel that this is not the
> best way. Can i use the .so files to call the functions and reach my
> requirement. I want to know how to compile and link the example files
> in the src directory.

You can create a module which would do what you want (that is download
some files with some rate) and report its status in a particular way (with
shared memory or anything).

The module could register a command which does what you want. Then you
can feed that command with arguments to stdin of lftp and the command
reports its status to your application.

--

-- 
   Alexander..

Vishwanath Patil | 9 Feb 04:56 2006
Picon

Re: lftp - modules

Can you tell me how do i compile and link the example files in the src
directory, I have been trying them since last 8 hours. I will work on
the lines you told me and try registering a command.

thanks
Vishwanath Patil

On 2/8/06, Alexander V. Lukyanov <lav <at> netis.ru> wrote:
> On Wed, Feb 08, 2006 at 05:43:25PM +0530, Vishwanath Patil wrote:
> > i want to use lftp as a back-end that downloads files from a ftp
> > server at a particular time with particular rate. The issue now is i
> > want to integrate this into another piece of application or control it
> > from that application. I tried using shared memory and diverted the
> > readline to shared memory. Now i can give any command from there and
> > lftp executed it.
>
> > But i think i dont need to add this or i feel that this is not the
> > best way. Can i use the .so files to call the functions and reach my
> > requirement. I want to know how to compile and link the example files
> > in the src directory.
>
> You can create a module which would do what you want (that is download
> some files with some rate) and report its status in a particular way (with
> shared memory or anything).
>
> The module could register a command which does what you want. Then you
> can feed that command with arguments to stdin of lftp and the command
> reports its status to your application.
>
> --
(Continue reading)

Alexander V. Lukyanov | 10 Feb 06:26 2006
Picon

Re: ls params

On Thu, Feb 09, 2006 at 12:17:59PM -0600, Javier E. Mosqueda Farias wrote:
> 1.- When you say "params" in the ls command of lftp, what commands do 
> you have available?  The default listing is alphabetic, but do you have 
> some by date?.  I tried -a, -b, etc., some fail, the ones which success 
> all give the same as with no params including the -F you mentioned in 
> one question before.

ls parameters are passed to ftp server. When using a protocol but ftp, these
parameters are handled by lftp's protocol backend.

There is cls command which interprets the parameters itself. See `help cls'.

> 2.- There is a site in Germany, servage.net, I can not use lftp to 
> access them, but I can use gftp.  They don't seem to understand what's 
> wrong.  Any suggestion that you have to give them a hint?

Turn on debug in lftp and see what's going on. If you don't understand ftp
protocol, send the debug output to me.

--

-- 
   Alexander..

Alexander V. Lukyanov | 10 Feb 06:33 2006
Picon

Re: LFTP data port for FTPS

On Thu, Feb 09, 2006 at 11:55:00AM -0800, Manuel_Susara <at> bio-rad.com wrote:
> I need some help in using FTPS with LFTP.  Can you please tell me what 
> ports (or port range) are used for data when I specify the 
> connection/protocol to be FTPS? 
> 
> Would it be just port 989 for data?  Or would it be some other port range?

The rules for ftps data port are the same as for plain ftp. In passive
mode lftp connects to whatever port the server chooses, in active mode
lftp takes a random port from ftp:port-range (or any free port if the
setting is empty).

> ----- Forwarded by Manuel Susara/Hercules/US/BIO-RAD on 02/09/2006 11:51 
> AM -----
> 
> Manuel Susara/Hercules/US/BIO-RAD 
> 02/07/2006 09:02 AM
> 
> We get account & password prompt when connecting to port 990, but can not 
> execute any LFTP command (such as 'ls' or 'cd') and get/see the 
> "Connection error" message. 

Turn on debug and see what's going on. Are you sure you want to use implicit
ssl protection? Maybe the server expects explicit one (on the default port 21).

--

-- 
   Alexander..

Alexander V. Lukyanov | 11 Feb 08:35 2006
Picon

Re: ls params

> I tried the cls as you said.  It works in part, this is I can sort "in 
> some way", but I noticed there is a bug when sorting, example.
> 
> On normal ls or rels, I find the latest file I updated is 10 feb at 
> 14:15 (files of 2006 don't show year.  Year is only shown in past years, ok)
> When listing recls -l --sort="date" this file is listed as 10 feb 2005, 
> and so is not at the top, but somewhere in 2005.

Is it reproducible with the latest lftp version 3.4.2?

--

-- 
   Alexander..

Alexander V. Lukyanov | 12 Feb 22:38 2006
Picon

Re: Moving directories with lftp

On Sat, Feb 11, 2006 at 11:01:40AM +0100, c0t0d0s0 wrote:
> It's seems like when I'm trying to move a directory into another, and that
> one has already a direcotry inside, it failes.
> lftp openprom <at> localhost:~> mv foo bar
> Access failed: 550 Rename bar: Directory not empty (foo)

Try:

    mv foo bar/foo

--

-- 
   Alexander.

Alexander V. Lukyanov | 14 Feb 14:35 2006
Picon

Re: lftp - modules

On Thu, Feb 09, 2006 at 09:26:12AM +0530, Vishwanath Patil wrote:
> Can you tell me how do i compile and link the example files in the src
> directory, I have been trying them since last 8 hours. I will work on
> the lines you told me and try registering a command.

Here is an example module attached. Compile it with command:

	gcc -fPIC -shared -nostdlib -I/path/to/lftp/include -I/path/to/lftp/src example-module1.cc -o example-module1.so

Then load with command:
	module /path/to/example-module1.so

It registers `test1' command which prints argc.

--

-- 
   Alexander.                      | software is knowlege   
#include <config.h>
#include "CmdExec.h"

Job *cmd_test1(CmdExec *parent)
{
   parent->printf("test1 called with %d arguments\n",parent->args->count());
   parent->exit_code=0;
   return 0;
}

CDECL void module_init(int argc,const char *const *argv)
{
(Continue reading)

Vishwanath Patil | 15 Feb 05:41 2006
Picon

Re: lftp - modules

Thanks for that Alexander...

I was successful in adding one more command directly but i had to
fiddle with a lot of code.... this one is really cool.

With some searching and hacking i could find out the status of the
file getting downloaded sent to some other application..... i want to
now have another way of Feeding the command...

Currently what happens is the Do loop of the CmdExec calls NextCmd and
that in turn is readline's get.... which is a blocking type of call.
Can a parallely add one more interface to send these commands without
disturbing the existing command line. i.e. i want to retain the
readline get.... and also to have another interface to give the
commands.... where should i modify the code....

Vishwanath Patil

On 2/14/06, Alexander V. Lukyanov <lav <at> netis.ru> wrote:
> On Thu, Feb 09, 2006 at 09:26:12AM +0530, Vishwanath Patil wrote:
> > Can you tell me how do i compile and link the example files in the src
> > directory, I have been trying them since last 8 hours. I will work on
> > the lines you told me and try registering a command.
>
> Here is an example module attached. Compile it with command:
>
>         gcc -fPIC -shared -nostdlib -I/path/to/lftp/include -I/path/to/lftp/src example-module1.cc -o example-module1.so
>
> Then load with command:
>         module /path/to/example-module1.so
(Continue reading)


Gmane