The best combination of Linux users: the lftp example

Something doesn't work as it should

This story actually starts years ago. I wanted to use lftp to transfer files to my host's server. Unfortunately, lftp seemed to just hang in there, stuck at the [Making data connection...] stage.

At that time, I frantically searched the web and I finally found a forum post that advised adding set ftp:ssl-allow off to ~/.lftprc. I did so, and I was at least able to transfer my files using lftp. Something seemed off, though. My not-yet-fully-security-aware self let it go: as long as it works...

Then, last month, I was confronted for a renewed need to use lftp with another server which previously didn't offer any possibility for secured file transfer. The server was upgraded, and it was announced that it now supported "FTPES". I thought, great, now I'll be able to transfer files securely. But then, I faced the same problem as a few years earlier: lftp didn't seem to be able to connect to the server: #176: lftp hangs (`ls' at 0 [Connecting...]).

This time around, though, I was determined to get to the bottom of it and understand what prevented me from using lftp over a secured protocol. So, I started searching...

The Google and forums nightmare

The official lftp documentation is almost non-existent. The extensive man-page is not explicit enough for regular users/newbies.

So there I was, searching and searching the web, muttering under my breath that software ought to be easier to configure and use, complaining about the time wasted trying to solve bugs instead of actually using the software for what we intended to do in the first place.

One of the first things I found was a page explaining how to make sure that lftp was compiled with SSL support. The lftp package distributed by my Linux distro didn't seem to comply, so I downloaded the source code and compiled it with SSL. Fortunately, I had by now learned how to compile a software, and I had all the required development files ready. In a way, I thought it was sad that to use Linux software, one has to learn how to compile stuff (I know it's generally not true, but in this case, it was necessary).

But that didn't solve the problem. lftp still wasn't properly connecting to the server.

So, I searched more, asking questions in big forums. My posts remained unanswered: evidently, nobody knew the solution. Searching more the web and the each forum, I found many, many posts by other users like me, facing the same problem.

I found 3, 4,... 6 years old posts that remained unanswered.

I found posts which promoted the unacceptable solution: set ftp:ssl-allow off.

Many posts included partial solutions or even downright wrong explanations, further muddying the waters.

I found posts where the solution appeared to be to tinker with the server itself, which I couldn't do.

But mostly, I found other users like me, asking the very same questions that were bothering me, questions that were never answered in a definitive way.

A knowledgeable user to the rescue

I finally concluded was the best thing would be to go to the source and ask there. Thus, I joined the lftp mailing list and asked there.

Here is where I got tremendously lucky. The mailing list is not very active, and looking at the archives, I noticed that many posts were never answered, so prospects didn't look good for me. But, contrary to my expectation, a generous, knowledgeable user named Dániel Fazekas patiently answered all of my questions, and allowed me to reach my goal: get the the bottom of the problem, and understand it once and for all. 1

Dániel described himself as a "satisfied lftp user" who is hanging around in the mailing list to pay back by helping users like me.

I am very grateful for his help and remain indebted.

Paying back for future users

The project hosted on this very web site aims to improve the documentation of each software Linux users might use, improve the quantity, and especially the quality of bug reports, bug triage, etc. so as to ultimately improve the software itself.

I don't consider it's enough to get help (often an unacceptable workaround), solve my specific problem and move on. It is not acceptable for different users asking the very same questions all around the web, to see those questions ignored, or, sometimes worse, answered in a way that does not solve the underlying problem, answered by well meaning souls who often do not fully understand the implications of their own answers.

The community spirit requires us to pay back so as to ensure that future users do not face the same difficulties.

So I was determined to follow the spirit that prompted me to create this web site, and make sure that all the undocumented features, the common 'gotchas' were properly documented.

Thus, I created the lftp documentation page on this site. It may not yet be complete nor perfect at this stage, but, being a wiki, it certainly can be improved over time. At least, it already contains all the information that would be enough to answer many of the question that have been asked again and again over the years, answered again and again with varying degrees of correctness.

Next time someone asks a question about lftp (or about any other software) point them to the appropriate wiki page. If it's lacking in any way, we can easily fix it.

Best combination

What is great about the Linux community, is that there are countless generous users who are willing to donate some of their time to answer the even more countless questions asked all over the web by fellow Linux users.

What's not so great about the Linux community, is that many (a majority) of people who receive help in forums and mailing lists, do not feed the information back into the software's official documentation, or at least into a wiki somewhere, in a way that ensures that any specific question need ever be answered once, allowing users to seek answers in the documentation and in wikis rather than automatically relying on other people's good will.

What is really great about this whole lftp-wont-work experience is that it put together a perfect combination of good will from all the parties involved. The perfect work flow goes something like this:

  1. A regular user experiences a problem.
  2. This problem highlights a deficiency of the software or of the documentation.
  3. The user asks for help.
  4. A knowledgeable expert comes to the rescue and provides the best advice/solution.
  5. The first user pays the community back by ensuring that the information is fed back into the proper channels (a well written bug report, or an appropriate edit of the wiki-documentation).
  6. Thus, future users knowing that the documentation is usually complete and reliable, get into the habit of checking there first (RTFM).
  7. This future users finds that the question she had in her mind has already been answered and been documented in the proper place.
  8. The whole Linux community wins.

Being the best

It is easy to overlook the importance of step 2, above. Basically, every single user who is asking a question has, by that very question, highlighted a bug, an area where the software is not intuitive or where the documentation is lacking.

This very web site is designed in a way to make sure such discoveries are being fed back up to the upstream documentation and developers. You may have noticed that there are no traditional forums here. Each question asked by Linux users is asked in a ticket. The ticket tracker helps to ensure that we, the community, do not forget to take the appropriate action to document solutions and workarounds. Only when this has been done, can the ticket be marked as 'fixed'. Thus, not only the OP has had his question properly answered, but future users would not need to ask the question again.

This way, we can ensure that the Ubuntu bug Number 1 gets fixed.



How about filtering files ? For example I only want to transfer .tar.gz files... I had a look at the commands manual but it didn't work out as expected.