File Transfer Protocol

Current status

  • Use KFTPGrabber for ftp transfers
    • nice GUI and bookmarks, handles SSL
    • log windon, integration with KDE
    • handles BOL and merton fine

Software and Guides

Commands for ftp over ssl

  • lftp <user@www.bol.ucla.edu>
    mput *
    ls
  • lftp
    set ftp:passive-mode true
    set ftp:ssl-force true
    connect www.bol.ucla.edu
    login <username>
  • ftp-ssl www.bol.ucla.edu
    passive
  • pftp www.bol.ucla.edu (not on amd64)

Installation history

KFTPGrabber -- a GUI client for ftp over tls/ssl on clitunno

On 14 January 2006, I built KFTPGrabber from svn (first time):

svn co -N svn://anonsvn.kde.org/home/kde/trunk/extragear/network
cd network
svn up kftpgrabber
svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin
make -f Makefile.cvs
./configure --prefix=`kde-config --prefix` --enable-debug=full
cd ..
mv network kftpgrabber-07
cd kftpgrabber-07
dh_make -s
edit debian/rules if necessary (e.g. rules or control)
fakeroot dpkg-buildpackage

This created a package that runs admirably, though it is somewhat crash prone. It has a good set of features -- richer than any ftp client I've seen in Linux so far -- and it integrates with KDE 3.5.  It handles ftp over tls/ssl and shows directory listings on refresh after transfer (make sure you disable "directory listing cache" in settings).

This finally appears to be the package KDE needs. I sent a request for packagingto Debian (also a first -- use "reportbug wpnn").  The beta was released in August 2005, evidence of the most recent development of either of the three KDE ftp clients KBear (crashes), Kasablanca (poor bookmarks), and KFTPGrabber (may have stability issues, very feature-rich).

Kftpgrabber is clearly superior to kasablanca, which I also built from cvs.  Kasablanca is very elegant and likely more stable, but  it lacks a decent bookmarking system.  Although its developer Magnus Kulke <sikor_sxe@radicalapproach.de> still does some occasional work on the package, kasablanca is no longer actively developed.

lftp, a command-line client for ftp over tls/ssl on clitunno

On 24 January 2005, to be able to access my BOL web site, I downloaded lftp and compiled it on clitunno, using fakeroot; it installed fine and works.  The simple way works fine:

lftp <user@www.bol.ucla.edu>
mput *
ls
Note that put doesn't work properly, while mput does. get and mget doesn't work because trevi doesn't have my BOL user.

You may need to use these commands:

lftp
set ftp:passive-mode true
set ftp:ssl-force true
connect www.bol.ucla.edu
login <username>

Specifically, issue "set ftp:passive-mode true" any time if you don't get a response to ls or put commands. This also works with ftp-ssl -- issue "passive" once you've logged in (or possibly before), and you should be fine. Note that the commands in ftp-ssl are somewhat different from those in lftp.

I haven't yet found a GUI frontend that works. I compiled kasablanca, which supports AUTH-TLS, but it doesn't quite work.

Installing a server on Cyberspace

On 5 May 2002 I started looking into activating an FTP server on Cyberspace. First candidate is ProFTP.

To see installed networking daemons, check out the Package Manager under Network | Daemons, or do a search for ProFTP. It looks like the telnet client works on Cyberspace and gubbio, but the telnet server is not active, which is as it should be (cf. ssh). I uninstalled the telnet server from both gubbio and Cyberspace.

I uninstalled fingerd, talkd, i4l, and other ISDN and ADSL components from both gubbio and Cyberspace -- or rather, kept them from starting by removing them from inetd.

ProFTP

  • Professional FTP Daemon offers features as configuration with a Apache like syntax in a single file and per directory with .ftpaccess, support of multiple virtual FTP servers and anonymous FTP services, _no_ SITE EXEC command to avoid security problems, hidden directories or files, wu.ftpd compatible logging (extended logging available), utmp/wtmp support, shadow password support, including support for expired accounts. Documentation in /usr/share/doc/packages/proftpd and www.proftpd.org

  • I installed version 1.2.2-70 on gubbio (with no errors) from n2 on the UIndiana mirror. It provides ftpcount, ftpshut, ftpwho, in.proftpd, proftpd.
  • However, ProFTP does not get good marks, although it comes with SuSE 7.3 and is integrated in the rc.config file.

  • Cf. these lines to /etc/rc.config (note that this is an alternative to starting the program with inetd.conf):

# Set this to 'yes' if you want to start the ProFTPD Server
# as Daemon instead via /etc/(x)inetd.conf. You have also
# to set ServerType to standalone in /etc/proftpd.conf.
#
START_PROFTPD="no"

  • After seeing the bad press, I removed it.

VSFTP

On 5 May 2002 I downloaded VSFTPD to Cyberspace from its home page, uncompressed it, and did a make and make install. There are no instructions for this, but it seemed to work.

  • "very secure FTP daemon" -- was (is?) running on Cyberspace, as an anonymous login
  • People can upload files, but they cannot download files they or others have uploaded
  • To allow others to download files, you have to change the permissions
  • You can modify the /etc/vsftpd.conf to allow steen (and other users) to access their files

Here are the file locations:

/etc/vsftpd.conf
/usr/local/man/man5/vsftpd.conf.5
/usr/local/man/man8/vsftpd.8
/usr/local/sbin/vsftpd

The further instructions are in the INSTALL file:

The FTP server will refuse to start up unless you satisfy a few prerequisites:
1) You will need the user "ftp" to exist and have a valid home directory.
2) You will need the user "nobody" to exist.
3) You will need an empty directory /usr/share/empty to exist.

I don't know how to create a user and couldn't figure it out after searching the web, but I tried "su ftp" and "su nobody" and found that indeed both of them already exist. I created the /empty directory. Finally, I added the line

ftp stream tcp nowait root /usr/sbin/tcpd vsftpd

to /etc/rc.config and did a /etc/init.d/inetd reload. That didn't seem to work, so I did kill -HUP <PID of inetd and then typed inetd to restart it. VSFTPD is still not starting, and it won't start from the command line -- it says it'll only start through inetd. (I later found out that this line was wrong -- see the correct version below, after much floundering).

VSFTPD seems to want xinetd, cf. http://www.synack.net/xinetd/, which isn't installed and which may not be fully compatible with SuSE. I'm not sure what to do -- the thing just needs to find a way to start. I then added START_VSFTP="YES" to /etc/rc.config and then ran /sbin/SuSEconfig to see if that would bring things up.

Not sure that this accomplished anything useful. Since this led nowhere, I installed xinetd, after having discovered that SuSE provides a package. See instructions. None of this succeeded (later I realized that the vsftpd doesn't start unless called by an ftp request -- it doesn't start from the inetd.conf alone)..

I then discovered that vsftpd was a SuSE package, which should be here in version 1.0.1; I found it mirrored here and installed it on Cyberspace. When I ran the rpm, I got a missing dependency for ftpdir and picked up that package too -- that may have been the problem (it's labeled as "a sample ftpd configuration"). Lesson: if you use SuSE, get the SuSE rpms. The installation looks much the same, but also includes /etc/pam.d/vsftpd.

From this site, I gather that the xinetd or the inetd configuration files should suffice to start vsftpd. Finally, I discover the line should be

ftp stream tcp nowait root /usr/sbin/vsftpd vsftpd

I set the port to 21 in CuteFTP and it works! Bloody mary -- after ten hours, I make it stick. It's fast and secure, though I want to limit the directories more. The basic directory that is opened is /usr/local/ftp/ -- I guess I could just remove the added stuff.

I defined /usr/local/ftp/pub as having chmod 777 so that people can write to it. They can't delete the files, however. You can set "allow local users" to let steen log into his files -- this seems risky and I left it at no.

For details, see man vsftpd.conf -- it has a man page! See also configuration hints.

FTPd -- this is the BSD daemon; supposedly slower than vsFTPd and not as secure either.

pureFTPd -- GPLed, secure, production-quality and standard-conformant FTP server

Relevant installed files -- see "locate ftp"

Configuration

/etc/ftpusers

Clients

/usr/bin/eftp
/usr/bin/ftp
/usr/bin/ftp-rfc
/usr/bin/pftp
/usr/bin/rftp
/usr/bin/sftp

  • lukeftp at nkitb/usr/bin/ftp
  • gftp at gftp (a multithreaded FTP client for X11)

Servers

/opt/kde2/bin/kwuftpd -- the KDE version of wuftp -- not recommended
/opt/kde2/share/doc/HTML/en/kwuftpd -- the documentation

/usr/lib/ssh/sftp-server -- this may be good, but perhaps it doesn't scale?

Documentation

/usr/share/man/man1/ftp.1.gz
/usr/share/man/man1/pftp.1.gz
/usr/share/man/man1/sftp.1.gz
/usr/share/man/man5/ftpusers.5.gz
/usr/share/man/man8/sftp-server.8.gz


 

top