Enhanced
Enhanced
LFTP is an alternative to the FTP command set, which supports many protocols and offers countless parameters.
Although pretty much outdated, the File Transfer Protocol (FTP) still plays a significant role. For 20 years, LFTP has offered a greatly expanded command set for the command line that handles secure transmissions, without being excessively difficult to handle.
FTP dates back to 1985. Designed for transferring files between two computers, FTP is a relic from the infancy of modern IT. Today it has lost much of its former importance, not least because of some serious security problems: It neither encrypts the FTP username and password, nor protects the data against manipulation during transfer.
FTP via SSL (FTPS) or SSH (SFTP) counteracts these weaknesses. The two methods are considered to be equally secure, and they encrypt both data and metadata during transmission. In most cases, SFTP proves to be more flexible and much simpler in practice.
Alternatives
FTP alternatives have been around for a long time – on Linux, the venerable secure copy (scp
) has been used to transfer data to other machines from the command line. In the meantime, WebDAV (Web Distributed Authoring and Versioning), a kind of extension of HTTP with new commands, has also developed into a useful replacement.
Nevertheless, FTP is a marathon runner for various reasons, most often because many web hosts only offer FTP and leave WebDAV or SSH out of the equation. FTP is thus likely to be around for a while.
LFTP is a very powerful extension of the original FTP command set that has been under development since 1997. It is developed by Alexander Lukyanov, is licensed under the GNU Public License (GPL), and was last updated to version 4.8.0 in July 2017 [1]. LFTP supports a wide range of protocols, including plain vanilla FTP, along with FTPS, SFTP, HTTP, HTTPS, HFTP, FXP (see the "FXP" box), Fish, and BitTorrent.
FXP
FXP, which stands for File Exchange Protocol, is a method defined in FTP, but not named there, for controlling file transfers between two servers on a client. The files move directly from server to server, saving time. Many current FTP clients support FXP.
Special Features
LFTP stands out from most other command-line FTP clients with advanced features such as recursive mirroring and the ability to update entire directory trees and manage bookmarks. Several simultaneous sessions to different servers are implemented by assigning commands to slots in a separate shell. Additionally, scheduled transfers can be queued and scheduled, and bandwidth use can be managed. If a transmission breaks down, LFTP resumes it later on at the same location. If you exit LFTP, it continues to process the active tasks in the background.
Client-Server Model
LFTP can be found in the repositories of most distributions; thus, you can usually install it with the package manager.
To test LFTP without an active server, it is best to install an FTP server on a second local machine, to which LFTP then establishes a connection. For example, the very secure FTP daemon (vsftpd
) [2] is a good way to go, because it does not require any configuration for simple tests. Before you can start, all you have to do is remove the #
comment sign in front of the #write_enable=YES
line in /etc/vsftpd.conf
.
Last but not least, create a directory on the client computer for the test and fill it with some data.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.