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
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.
-
Rhino Linux Announces Latest "Quick Update"
If you prefer your Linux distribution to be of the rolling type, Rhino Linux delivers a beautiful and reliable experience.