What is FTP?
FTP Stands for File Transfer Protocol. FTP allows you to accessremote computers and retrieve files from these computers. You can find FTP in the menu of your Internet access software program.
FTP is an Internet (or more properly a TCP/IP) communications protocol to allow you to upload and download files from a machine connected to your local machine via the Internet. FTP is composed of two parts; an FTP client and an FTP server. The FTP client is the software you execute on your local machine to send or receive files. The FTP server is software which executes on a server machine on which the files are to be saved or retrieved. Most (if not all) machines which provide Web serving capability also serve as FTP servers to allow you to upload your web pages. Web pages are usually composed of HTML source files and images (either JPEG or GIF format).
A typical FTP session consists of these seven steps:
- Launch your FTP software (Fetch, Netscape, Minuet, and so on).
- Tell your software the address of the computer you are seeking.
- Tell the FTP server who you are (usually anonymous).
- Enter the password when prompted. Most of the time, entering a password is optional for public sites. It is common Net courtesy to enter your entire e-mail address instead of just leaving things blank.
- Browse the directories for files you want.
- Get the files you want.
- Log off (usually by typing quit, exit, or bye).
Install FTP Service
Check whether wu-ftpd is installed by doing: rpm -qa | grep wu-ftpd
If not download the wu-ftpd RPM package for
www.wu-ftpd.org (or) www.redhat.com
Download the rpm file called wu-ftpd.x.x.x.rpm
For Install wu-ftpd RPM package :
# rpm –ivh wu-ftpd.x.x.x.rpm
Ftp server installed successfully . A file named wu-ftpd goes to /etc/xinet.d/ – To run ftp server you should edit the wu-ftpd file .
Then just edit the last line –
disable = yes
disable = no
And restart xinetd service (service xinetd restart or, /etc/init.d/xinetd restart).
Test your FTP Server:
Is it prompting for user name or password ?
Secure your FTP server:
# joe /etc/xinet.d/wu-ftpd
Then add the following line at the bottom of the file
only_from = 192.168.10.0/24
That will prevents all other than that block of ip address.
FTP Server/client Configuration Files
Enable the following services
An FTP server connects with clients on two ports. The control process use 21 and data transfer processes use 20.
For a client to log in to FTP, the client must have a username in /etc/passwd file. This file is used to validate the user’s name and password.
Anonymous FTP server is that where no password is required. To disallow anonymous login, remove the ftp account . To login as anonymous user, login as user anonymous and email address as password.
This file contains a list of users that are prohibited or denied from logging in using ftp command.
This is the ftpd configuration file. It contains all the configuration settings.
This file can be used to limit the access.
allow user-name hostname/ IP Address
allow aminul linux1
This allow command will allow user aminul to log in from host linux1 but from nowhere else.
Control and Monitoring FTP Server
Checking the current load
Checking the current session
Shutting down and restarting FTP service
# ftpshut now
#ftpshut +10 (FTP will shut it down in 10 minutes)
#ftpshut 1045 (FTP will shut is down 10:45 AM)