Red Hat Linux 7 Unleashed

Red Hat Linux 7 Unleashed

By William Ball

Getting and Installing the FTP Server

Red Hat Linux uses the freely available wu-ftpd server. This server comes as an RPM (Red Hat Package Manager) and will be installed during installation. If you decide you want to run an FTP server but did not install the RPM, fetch wu-ftpd-2.6.1-6. i386.rpm from the CD-ROMs or check http://www.redhat.com for the latest edition.

To install the RPM, mount your Red Hat CD-ROM and as root run the following:


   # rpm -ivh /mnt/cdrom/RedHat/RPMS/wu-ftpd*.rpm

If you plan to offer an anonymously accessible site, be sure to install anonftp-3.0-a. i386.rpm from the CD-ROMs as well. As always, you can check for the latest version at http://www.redhat.com.

To install the anonymous FTP file, log in as root and run the following:


   # rpm -ivh anonftp*.rpm

Now you have a working anonymous FTP server. Of course, you should also have an active Internet network connection and a valid host and domain name for a truly public server. See Chapter 14, "Domain Name Service and Dynamic Host Configuration Protocol," for details about Domain Name Service (DNS).

To test whether the installation worked, simply use the FTP client and connect to your machine. For the sample FTP server, vaio, you would respond to the following:


   # ftp vaio.home.org
Connected to vaio.home.org.
220 vaio.home.org FTP server (Version wu-2.6.1(1) Mon Jul 24 01:59:25 EDT 2000) ready.
Name (vaio.home.org:bball): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password: bball@tux.org
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.

ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for directory listing.
total 32
d--x--x--x   2 root     root         4096 Aug  9 15:08 bin
d--x--x--x   2 root     root         4096 Aug  9 15:08 etc
drwxr-xr-x   2 root     root         4096 Aug  9 15:08 lib
drwxr-xr-x   2 root     50           4096 Jul 12 11:31 pub
226 Transfer complete.
ftp>

As you can see, after you log in, you'll be in the /home/ftp directory. To quit the FTP client software, simply type bye or quit at the ftp> prompt. If you want to test the private FTP server, rerun the FTP client but use your login instead of the anonymous login. Here's an example:


   # ftp vaio.home.org
Connected to vaio.home.org.
220 vaio.home.org FTP server (Version wu-2.6.1(1)
Mon Jul 24 01:59:25 EDT 2000) ready.
Name (vaio.home.org:bball): bball
331 Password required for bball.
Password: mypassword
230 User bball logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for directory listing.
total 8856
-rw-rw-r--   1 500      500        500309 Aug 16 15:53 06fig01.pcx
-rw-rw-r--   1 500      500        480674 Aug 16 16:30 06fig02.pcx
-rw-rw-r--   1 500      500        496037 Aug 16 16:10 06fig03.pcx
-rw-rw-r--   1 500      500        361017 Aug 15 13:16 28fig12.pcx
drwxr-xr-x   4 500      500          4096 Aug 21 09:30 Desktop
drwxrwxr-x   5 500      500          4096 Aug 10 00:40 GNUstep
-rw-rw-r--   1 root     root          101 Aug 16 15:42 mychat
-rw-rw-r--   1 root     root          144 Aug 16 15:44 out.txt
-rw-rw-r--   1 500      500        176463 Aug 16 14:59 ppp-2.3.11-7.i386.rpm
226 Transfer complete.
ftp>

As you can see, when you log in with a registered username and password, you'll be placed in your home directory on the remote computer.

Share ThisShare This

Informit Network