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
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.