• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 7 : How to install and configure ftp server (vsftpd)

by admin

The FTP service/server is provided by the vsftpd daemon. Very Secure FTP Daemon (vsftpd) is the most secure and fastest FTP server. By default, the vsftp server runs on the port 20 and 21. To configure FTP service on RHEL7, please follow the steps given below.

Install and configure vsftpd

1. First and foremost install the vsftpd package which provides the FTP service.

# yum -y install vsftpd

2. Set the range of ports that can be used by ftp in /etc/vsftpd/vsftpd.conf. (note : by default, it uses passive mode)

pasv_min_port=3000
pasv_max_port=3500

Enable the vsftd service

Configure the vsftpd service to be started when the system boots:

# systemctl enable vsftpd.service  
# systemctl start vsftpd.service

Open the ports in firewalld

1. Open the ports that will be uesed by ftp.

# firewall-cmd --add-port=21/tcp --add-port=3000-3500/tcp --permanent

2. Restart the firewalld.service for the changes to take effect.

# systemctl restart firewalld.service

Configure SELinux for vsftpd

If you want to make regular user be able to get files from server and put files to server when SELinux is enforcing, please set the boolean value as below. This is required only when SELinux is in enforcing mode.

# setenforce 1   
# setsebool -P ftpd_full_access 1

How to add/modify vsftpd banner?

Follow the steps below to add or modify the vsftpd login banner.
1. Add the following line to the file /etc/vsftpd/vsftpd.conf

ftpd_banner=[YOUR BANNER HERE]

2. Restart the vsftpd service.

# service vsftpd restart
CentOS / RHEL 7 : unable to start vsftpd service

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Recover Corrupted Root Partition from Rescue Mode in CentOS/RHEL 5,6
  2. dmidecode Command Examples in Linux
  3. CentOS / RHEL : How to delete LUKS encrypted device
  4. CentOS / RHEL 7 : Beginners guide to systemd
  5. How to Run DNS and FTP services in a chroot Jail
  6. MySQL Fails to Start Using systemctl On systemd Linux Distributions
  7. Hostname change not reflecting in sar report for CentOS/RHEL
  8. RHEL 7 – RHCSA Notes – Set enforcing and permissive modes for SELinux
  9. How to Rebuild the “initramfs” with Multipath in CentOS/RHEL 6 and 7
  10. /dev/shm permission change after node reboot

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright