Install and configure FTP server in Redhat/Centos Linux?

Posted by linuxnix on Mar 11, 2016 4:49 AM EDT
www.linuxnix.com; By Surendra kumar
Mail this story
Print this story

FTP stands for File Transfer Protocol. It was written by Abhay Bhushan and published in 1971. FTP is supported by all the operating systems and browsers.

FTP stands for File Transfer Protocol. It was written by Abhay Bhushan and published in 1971. FTP is supported by all the operating systems and browsers.

It is a client-server based protocol.

How FTP works

Step a: Client connects to server on port 21. Step b: Server responds and ask for authentication.

Step c: Client decides weather to connect passively or actively and authenticate with credentials(user name password).

Step d: If it is an active connection, server opens port 20 for data transfer and gives ftp prompt after successful authentication.

Step e: Client call for file and server initiates file transfer.

Following picture shows a simple way of data transfer through http://ftp. Installing FTP server in Centos

Step 1: We will use below host name and IP address for our test machine to setup FTP server

Server IP: 192.168.0.9

Host Name: http://ftp.linuxnix.com

Just edit file /etc/hosts

#vi /etc/hosts and add the line on bottom and save

192.168.0.9 http://ftp.linuxnix.com

Step 2: Install vsftpd (very secure FTP daemon) package.

#yum install vsftpd ftp Configuring FTP server in Linux Centos

Step 3: Configure vsftpd package. We will edit /etc/vsftpd/vsftpd.conf you can do this with gedit (If installed) or vi command.

#vi /etc/vsftpd/vsftpd.conf

Change the line which contain anonymous_enable=YES to anonymous_enable=NO. This will permit any one to access FTP server with authentication.

anonymous_enable=YES Uncomment the following line

local_enable=YES allow users in /etc/passwd to login

write_enable=YES allow users to write files. “NO” will permit only to read.

Change the line chroot_local_user=NO to chroot_local_user=YES. This will permit local user as FTP account. If you add an user, it will be treated as a FTP account as well.

The local user directory will be the FTP directory.

continued...

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux, Red Hat

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.