Questions tagged [lftp]

lftp is a file transfer program that supports several network protocols.

lftp is a file transfer program that can handle several network protocols, such as FTP, FTPS, HTTP, HTTPS, HFTP, FISH, SFTP and file. Its man page details usage.

It originated as part of ftpclass, but was renamed to lftp in 1997. More at the Wikipedia page for lftp.

51 questions
7
votes
1 answer

How to enable lftp protocol logging?

We are trying to get lftp to log all its protocol commands (during the login). I see several verbose options in the man page but the all have to do with a specific command issued after logging in (like: queue, or mirror). Is there a way to enabled…
jcalfee314
  • 765
  • 4
  • 10
  • 23
7
votes
4 answers

trust server certificate with lftp

When connecting to a server with lftp, I have the following issue: Certificate verification: Not trusted: no issuer was found (AA:AA:AA:[...]:AA:AA) Which indicates at least that the cert verification failed. I would like to whitelist that…
MayeulC
  • 235
4
votes
0 answers

Resuming segmented file transfer

When I run an lftp command like this: mirror --use-pget-n=10 "My Directory" sometimes I find myself in a situation, that the computer was unexpectedly shutdown, say, during a blackout. After that, if I examine my local folder "My Directory" I…
3
votes
3 answers

Does LFTP support keepalive for FTP/SFTP?

In the documentation it's not clear whether lftp support keepalive for FTP and SFTP protocols. Does someone know the answer?
Gill Bates
  • 165
  • 1
  • 1
  • 11
3
votes
1 answer

How to disable Lftp chmod permissions warning?

I use this script (launching lftp with some options) to mirror a local folder and a website. #!/bin/bash HOST="myhost.com" USER="user" PASS="xxxxxx" lftp -c "set ftp:list-options -a; set cmd:fail-exit yes; open ftp://$USER:$PASS@$HOST; lcd…
ppr
  • 143
3
votes
0 answers

lftp mirror -I and mirror -i don't work

I am using the following command lines to mirror a remote server to my local directory: $ lftp -d -c 'open -e "mirror -i ^ABC . mirrordir/" http://ftp.abc.com/dir1/dir2' $ lftp -d -c 'open -e "mirror -I ABC*/ . mirrordir/…
3
votes
1 answer

lftp: bash equivalent of command substitution backticks or $()

Is it possible to use bash-like command substitution, like backticks `` or $() with lftp? This is to e.g. cd into a directory given by a command: lftp .. cd `pwd`
gauteh
  • 133
3
votes
0 answers

lftp miror does not remove extra files

I'm trying to mirror remote ftp to local dir: lftp -u 'user','pass' -e 'mirror -vv ./wp-content ./ && ex' sftp://x.x.x.x -p 22 Old file `cache/index-https-mobile.html' is not removed Old directory `cache/w-r' is not removed The local user is…
Putnik
  • 945
2
votes
1 answer

lftp for sftp is not working; stuck on `ls' at 0 [Connecting...]

I am having an issue with lftp where it gets stuck on `ls' at 0 [Connecting...] for an SFTP connection. Versions: Linux 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 4 14:55:32 EST 2024 x86_64 x86_64 x86_64 GNU/Linux LFTP | Version 4.4.8 Here how I…
2
votes
1 answer

lftp how to upload everything new inside a folder but not the folder itself

I have this script in the a Pipeline: lftp -c " set ftp:ssl-force true; set ssl:verify-certificate false; open -u $FTP_USER,$FTP_PASS $FTP_HOST; cd remote-folder; mirror -R -e -v -n ./dist ./; " It's working, but I don't wish to upload…
2
votes
1 answer

Specify key exchange protocol with lftp

I have to download some (large) data from a distant server. The remote IT people suggest using lftp sftp://user@server.domain:port. However, when I type ls, I read: `ls' at 0 [Unable to negotiate with XXX.XXX.XXX.XXX port PPP: no matching key…
user980053
  • 233
  • 1
  • 2
  • 6
2
votes
1 answer

How do I specify an MVS data set name when using lftp?

We have a Linux server that needs to send a file to a z/OS mainframe using FTPS. How do we specify the MVS data set name we want to create? When we try to FTP the file, it always prepends the mainframe user ID to the data set name.
Matt
  • 21
2
votes
1 answer

Add time offset for mirroring via lftp

I am working on a CI runner in GitLab which is supposed to transfer changed files via FTP to a development environment. lftp seemed to be a good solution for doing so as it's easy to use and not overly complicated. I am using this to transfer files:…
flomei
  • 121
2
votes
0 answers

Retrieving from ftp dirs with wildcards

What is the most efficient way to retrieve all relevant data from ftp if the address of said data can be specified with wildcards as below: ftp://ftp.some.site.gov/data/directory/only/*/these/*/*files.gz
5heikki
  • 121
1
vote
2 answers

How do I attach running lftp process

I have lftp process running for days at a time on a CentOS machine. I read the lftp man pages and discovered the attach command. However when I call it with the respective process id from the lftp shell I get Unknown command "attach". Any…
cathal
  • 11
1
2 3 4