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
-
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.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
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.