Skip to main content

Questions tagged [lftp]

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

1 vote
1 answer
28 views

How to resolve the password prompting issue when setting up lftp connection with sftp and ssh-key in centos?

I have a centos server s1 and client c1 and I wanted to do a lftp connection with sftp and ssh-key without the password been prompted. Currently when I run the below command the password is prompted ...
JCDani's user avatar
  • 111
1 vote
1 answer
422 views

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 ...
user3152289's user avatar
0 votes
0 answers
41 views

How to stop backup being deleted as soon as it is completed?

Duplicity full backup via ftp completes, then is deleted, all with no user action. There are 2 things I would like to know; is there anything in the information below that explains this problem? ...
user avatar
0 votes
0 answers
83 views

lftp silently refuses to download certain directories, files

I am using the following command: lftp -c 'user user password ; set xfer:clobber off; set net:max-retries 0; set net:persist-retries 0; mirror --parallel=500 --verbose=10 --only-missing --ignore-time -...
Anm's user avatar
  • 119
0 votes
0 answers
146 views

lftp: How to list transfer size before (mirror) operation?

I have an lftp job that is going to transfer a large amount of data (30GB) to a slow remote FTP server. For various reasons, it won't work in one shot (which probably will take days anyway) but has ...
flyingfishfinger's user avatar
0 votes
0 answers
128 views

lftp in shell script fails with "pseudo-tty allocation failed" only when run via cronjob

I am trying to create a shell script which copies a file to a foreign server using SFTP (because SSH is not available on the foreign server). The script works as expected when run via console, but it ...
Jan's user avatar
  • 101
1 vote
1 answer
952 views

How to run concurrent (parallel) downloads with lftp?

lftp supposedly supports downloading mutliple files concurrently using get -P: From the NEWS file: Version 4.8.0 - 2017-07-10 ... * get/mget/put/mput: add -P option for parallel transfers and long ...
Zilk's user avatar
  • 346
2 votes
1 answer
857 views

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 ./...
Manuel Simões's user avatar
1 vote
1 answer
1k views

lftp unable to connect to ftp site, but using filezilla can connect successfully

I can successfully connect to ftp server using filezilla with SFTP protocol. But when I try to connect using lftp, and send ls command for listing remote folder, it just keeps on showing status ...
Yooza Dirgayuza's user avatar
1 vote
0 answers
1k views

lftp hangs up on "connecting" when tried to use ACTIVE mode

I need to use lftp in active mode (due to some limitations on the server side). So I have set up the following ~/.lftprc config-file: debug set ssl:verify-certificate no set ftp:port-ipv4 148.X.X.86 ...
Marcin Kawka's user avatar
0 votes
1 answer
904 views

put command work with interactive "ftp", but not with "lftp"

I want to send a file to an FTP server (which is out of my control), and when using the interactive Linux command ftp, this works fine: [bf@localhost sudap]$ ftp ftp.example.net Connected to ftp....
Bart Friederichs's user avatar
0 votes
1 answer
658 views

How to have `lftp` compare directories and only sync changed files?

The entirety of my question is summed up in the title. If there isn't a way to do this, what FTPS-compatible alternative would allow it? I'm running Debian GNU/Linux 11 (Bullseye) Stable.
GPWR's user avatar
  • 511
1 vote
1 answer
310 views

Can't delete a hidden file on a linux server

I've a backups linux server where I upload my backups via lftp. I don't have any other way to access this server. For some reason I can't delete a hidden file. $ls -la drwxr-xr-x 2 100 ...
Raymond's user avatar
  • 123
0 votes
0 answers
482 views

Is there an alternative command or way to speed up find in LFTP?

There is an FTP server I'm connecting to, and it could possibly have 20-30k zip files and an assortment of subdirectories. I would like to return a list of all of these files based on their extension, ...
mahbad's user avatar
  • 3
0 votes
0 answers
1k views

Connect to SFTP via a http proxy in lftp?

I am behind a http proxy (http://localhost:8080). I want to connect to my sftp server via this http proxy using the lftp command. How to do that ? My lftp command now is lftp sftp://... How to ...
Simplecode's user avatar
0 votes
0 answers
867 views

Transferring a 28GB directory with lftp:mirror was slow and caused 4 TB of bandwidth usage

I'm writing this post in hopes to learn what I did wrong. Linux isn't my forte, but I am comfortable with it and do read the man pages when I don't remember how to perform a task. Hopefully someone ...
ross_troha's user avatar
1 vote
1 answer
2k views

"find" using LFTP tries to access arguments

I connect via lftp -u username, sftp://server.name.com:/directory to a sftp-server, which works correctly. Anyhow, I want to use find. -name *someWildcardExpression -type f -delete in order to delete ...
Markus's user avatar
  • 113
1 vote
1 answer
1k views

Lftp --newer-than is downloading empty directories

I am trying to use lftp to download only new files files from a remote sftp server to the local server This is what I am doing: lftp sftp://user@remoteserver cd to the directory then: mirror --newer-...
StarL0rd's user avatar
1 vote
0 answers
3k views

TLS 1.2 connection with lftp

I'm trying to connect to a server from my RHEL 7 server that only accepts FTPS, TLS 1.2 connections. The only client available seems to be lftp. When I try to connect, it hangs on "TLS negotiation......
Scott's user avatar
  • 11
1 vote
1 answer
5k views

How to log some, but not all, lftp transfers

I have an lftp script file that I use for mirroring some directories over sftp, so I run the command using something like lftp -f mirror_dirs.lftp. I would now like to log the transfers to a specific ...
President James K. Polk's user avatar
2 votes
1 answer
2k views

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://[email protected]:port. However, when I type ls, I read: `ls' at 0 [Unable to negotiate ...
user980053's user avatar
0 votes
0 answers
523 views

vsftpd uses TLS1.1 even after disabling

I have disabled TLS1.1 and SSLv3 in my vsftpd.conf ssl_tlsv1_1=NO ssl_tlsv1_2=YES ssl_tlsv1=NO ssl_sslv2=NO ssl_sslv3=NO ssl_ciphers=DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES128-...
Fazlin's user avatar
  • 193
0 votes
1 answer
5k views

lftp behind firewall – what ports need to be opened?

I need to setup a secure file transfer from Linux client to z/OS ftp server using TLS 1.2 secure protocol. I am trying to use the lftp client for this purpose. My Linux server is behind a firewall. I ...
Leonid's user avatar
  • 1
0 votes
1 answer
971 views

A way to stop lftp from issuing "CWD /" when transferring a file

Given an lftp command similar to the following: lftp -vv -d -c set ssl:ca-file /path/to/cert/ftps_cron-bundle.crt; set ssl:check-hostname no; set ftp:ssl-protect-data true; set sftp:connect-program "...
kbulgrien's user avatar
  • 595
4 votes
3 answers
7k views

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 ...
MayeulC's user avatar
  • 195
1 vote
5 answers
1k views

How to copy millions files from dedicated server to AWS EC2? [closed]

I have a website that needs to move from a dedicated server to AWS EC2 instance. I have 650GB+ data and 3+ million files. I tried using SCP like this but because of huge file it taking so much time. ...
Mi2's user avatar
  • 11
3 votes
3 answers
2k views

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's user avatar
2 votes
1 answer
2k views

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 ...
Matt's user avatar
  • 21
0 votes
0 answers
951 views

Simple Command for Cron Job that will FTPS a Text File to Remote Server

I am trying to have a text file moved routinely from our server to a remote server. The remote server requires ftps protocol and our servers IP address to be whitelisted (which I have done). The best ...
Piranha's user avatar
0 votes
0 answers
508 views

best way to backup data to a sftp server

In my projects, I have work on a 800 GB of data (that includes data and codes). Some part of my data is constituted by somewhat large files, ~1GB, but I have also some folder with thousands of small ...
simona's user avatar
  • 207
3 votes
1 answer
2k views

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-...
ppr's user avatar
  • 143
0 votes
1 answer
357 views

Prefixing protocol for address in ssh and lftp

I'm using ssh to connect to my remote server. I'm able to do so fine using the regular SSH commands, but using lftp to connect requires prepending sftp:// to the address for it to work. What's the ...
shem's user avatar
  • 1
4 votes
0 answers
901 views

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, ...
Andrew Savinykh's user avatar
3 votes
0 answers
821 views

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 "...
Ankur Agarwal's user avatar
0 votes
1 answer
235 views

Received time of file in Linux

I'm sending a file from one server to another via lftp. Suppose S1 and S2 is two server. A file file1 is created at S1 at Mar 27 19:41. ls -ltrh shows it. I sent the file to S2 at Mar 28 20:00 ...
Milon Sarker's user avatar
3 votes
1 answer
443 views

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's user avatar
  • 133
2 votes
1 answer
1k views

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 ...
flomei's user avatar
  • 121
1 vote
0 answers
394 views

lftp bi directional syncing

How to sync directories on two different machines? If I change/add/delete a file on the windows machine, it should be changed/added/deleted on the linux machine and vice versa. I have to use lftp to ...
stackunderflow's user avatar
1 vote
0 answers
745 views

Downloading large file via SFTP timeout

I've been trying to download a 3GB file from an SFTP server. However, I keep getting timeout. Downloading a smaller size file works without issue. I tried in different workstations and servers as well ...
drum's user avatar
  • 689
2 votes
0 answers
638 views

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 ...
Putnik's user avatar
  • 924
1 vote
2 answers
2k views

lftp: where are bookmarks stored on debian jessie?

Bookmarks are saved but I get an empty (new file) when I run bookmark edit inside lftp and I don't have any ~/.lftp/bookmarks file. For information, I add bookmarks like this: $ lftp sftp://username@...
Hub 20xx's user avatar
  • 111
0 votes
1 answer
260 views

Recommended file extension for Linux 'lftp' scripts?

lftp allows to execute commands from the script file by using -f option (as described on man page), e.g. lftp -f my-lftp-script-file Is there any file extension that is recommended (or just widely ...
ppawel's user avatar
  • 101
2 votes
0 answers
280 views

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/*/*...
5heikki's user avatar
  • 121
1 vote
1 answer
2k views

Working with LFTP, find and -exec option throws error

What is wrong with the following lftp command? There files on server. I am trying to get their names without any path in it (like ./) Just file names. lftp -u user,password -e 'find -exec basename {} ...
user2023507's user avatar
0 votes
1 answer
935 views

All Time Lftp Mirroring

How to make lftp run in background all time and push any change made to a local folder to a folder on remote server. The normal reverse mirror command isn't working for all time and specific to ...
Jatin Luthra's user avatar
1 vote
2 answers
1k views

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 ...
cathal's user avatar
  • 11
-1 votes
1 answer
157 views

Automatically lcd to ~/Downloads on every lftp connect

How can I configure lftp to automatically lcd to ~/Downloads whenever I connect to any FTP server?
mcandre's user avatar
  • 3,048
1 vote
1 answer
1k views

How can I permanently disable directory caching in lftp?

I attempted to configure my $HOME/.lftp.rc to permanently disable directory caching (it has a nasty habit of never bloody updating). https://raw.githubusercontent.com/mcandre/dotfiles/master/.lftp.rc ...
mcandre's user avatar
  • 3,048
1 vote
0 answers
2k views

lftp mirror mode over hftp/proxy not working

When I connect lftp over an http proxy using hftp and try to use mirror mode, no files are transferred. dir and get work fine. Mirror mode works fine when I connect directly. Here is the script I ...
frankc's user avatar
  • 301
1 vote
1 answer
2k views

shell script file (.sh) - dynamic command

I'm trying to build a dynamic command to execute in an .sh file, however, when I do it, it seems that somehow it adds \r characters so command is not correctly executed. Notice that I'm running this ...
pacojones's user avatar
  • 151

15 30 50 per page