How to install ftp server?



FTP is used to transfer the file from the source machine to any machine on any location, this is one of the original software or a protocol of TCP/IP protocol suit. It works on server client mode, it was developed for centralizing the data so that client can download their required things wherever whenever they want.
Port number of FTP is 20,21. It listens the request on port 20 and makes the connection on port 21.

Here we are using VSFTPD(Very secure FTP Demon): It is one of the original software included with red hat provides the more security then other protocol.

How to install ftp server?
#yum insall vsftpd
You can use rpm or yum to install vsftpd.

Now your server is installed, make the changes according to your need in the configuration file /etc/vsftpd/vsftpd.conf

Some Important tips for FTP Server

anonymous_enable=yes: It is a global user, through which anybody can access it. Change it to NO to disable anonymous access.
local_enable=yes: It allows the system users to access the FTP.
local_root=/var/ftp: Add this to assign home directory to all ftp users, by default this line is not in the configuration file and the ftp's home directory is the home directory of the user itself.
chroot_local_user=yes: Add this line to enable the chroot in FTP. Using this, user can not change their home directory. TO make your FTP server secure enable this feature with anonymous_enable=no.
/etc/vsftpd/userlist: It allows the user to connecct with ftp server.
/etc/vsftpd/ftpusers: It denies the suers to access ftp.
/var/log/xferlog: This file contain the logs of ftp server.

Restart the service now:
#service vsftpd restart
#chkconfig vsftpd on

If SELinux is enabled on the server, then it may create problem in making connection from the client side. Use this to allow ftp connection.
#setsebool -P ftpd_disable_trans=1

On Client's side:

GUI: Open the browser and open the URL ftp://serverIP

CLI: #ftp serverIP

Useful commands:
ls: To list the file and folders.
get filename: To download the file.
mget filename*: To download the multiple files.
put filename: To upload the file.
mput filename: To upload multiple files.

No comments: