Configuring an FTP Server

File Transfer Protocol (FTP) is a long-established Internet protocol for downloading files. In Fedora, you can use the Very Safe FTP program, vsftp, to serve data via FTP.

How Do I Do That?

To serve content via FTP, just install the vsftpd package and place the content that you wish to make publicly available in the /var/ftp directory.

Tip

If you are using a firewall, you will need to open the FTP ports in the firewall.

To view the contents of /var/ftp with a browser, go to ftp://<hostname>/. To access files in a home directory, use the URL ftp://<user>@<hostname>/ (the browser will ask for your password) or ftp://<user>:<password>@<hostname>/.

To access the contents of /var/ftp using a command-line FTP client program, log in as anonymous and use your email address as your password:

$ ftp
ftp> open 
               
                  ftp.fedorabook.com
               
Connected to 172.16.97.100.
220 (vsFTPd 2.0.4)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (ftp.fedorabook.com:chris): 
                  anonymous
               
Password: 
                  chris@fedorabook.com
               
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls 227 Entering Passive Mode (172,16,97,100,237,192) 150 Here comes the directory listing. drwxr-xr-x 2 0 0 4096 Mar 09 16:41 fedora-core-5 drwxr-xr-x 2 0 0 4096 Mar 09 16:41 fedora-core-6 drwxr-xr-x 2 0 0 4096 Mar 09 16:41 fedora-linux drwxr-xr-x 2 0 0 4096 Mar 09 16:42 images drwxr-xr-x 2 0 0 4096 Mar 09 ...

Get Fedora Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.