On CentOS 5.9 :
netstat -anp | grep 25
yum install ftp*
yum install lftp*
yum install vsftpd*
Install And Configure FTP Server On CentOS 7
by SK
Please shareShare on Facebook415Share on Google+2Tweet about this on Twitter16Share on LinkedIn0Share on Reddit0Digg thisShare on StumbleUpon1Share on VKBuffer this page
vsftpd (Very Secure File Transport Protocol Daemon) is a secure, fast FTP server for Unix/Linux systems. In this how-to article, let us see how to setup a basic FTP server on CentOS 7. However, this procedure might work well on RHEL CentOS, Scientific Linux 7 version too.
My testbox server hostname and IP Address are server.test.local and 192.168.1.101/24 respectively. Change these values to match your scenario.
Install vsftpd
All commands should be run with ërootí user. Run the following command in terminal to install vsftpd package:
yum install vsftpd ftp -y
Configure vsftpd
Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,
vi /etc/vsftpd/vsftpd.conf
Find the following lines and make the changes as shown below:
[…]
Disable anonymous login
anonymous_enable=NO
Uncomment
ascii_upload_enable=YES
ascii_download_enable=YES
Uncomment – Enter your Welcome message – This is optional
ftpd_banner=Welcome to TEST FTP service.
Add at the end of this file
use_localtime=YES
Enable and start the vsftpd service:
service vsftpd status
service vsftpd start
chkconfig vsftpd on
(for centos 7)
——–if ftp file transfer or any error————
ps -ef|grep lftp
pkill -9 lftp
systemctl enable vsftpd
systemctl start vsftpd
systemctl enable vsftpd
Firewall And SELinux Configuration
Allow the ftp service and port 21 via firewall.
firewall-cmd –permanent –add-port=21/tcp
firewall-cmd –permanent –add-service=ftp
Restart firewall:
firewall-cmd –reload
Then, update the SELinux boolean values for FTP service:
setsebool -P ftp_home_dir on
Create FTP users
By default, root user is not allowed to login to ftp server for security purpose. So, let us create a normal testing user called ìskî with password ìcentosî.
useradd sk
passwd sk
Connecting to FTP server
Now, try to connect to FTP server itself with user ìskî:
ftp 192.168.1.101
Enter the ftp user name and password.
Sample Output:
Connected to 192.168.1.101 (192.168.1.101).
220 Welcome to TEST FTP service.
Name (192.168.1.101:root): sk
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Congratulations!! you will be able to login to FTP server without any problems.
Client side configuration
Let us try to log in to the FTP server from my Ubuntu client system.
ftp 192.168.1.101
Sample Output:
Connected to 192.168.1.101.
220 Welcome to TEST FTP service.
Name (192.168.1.101:sk): sk
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
Voila!! Our FTP server is working.