• 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 block a specific IP Connecting to a server with firewall-cmd
  2. How to enable text colour in vi similar to vim in CentOS/RHEL
  3. How to Enable Password Aging in Linux with NIS
  4. datamash: command not found
  5. 18 Practical tcpdump Command Examples – A Network Sniffer Tool Primer
  6. “VDO Status: Out of space” – Error while creating a VDO disk
  7. CentOS / RHEL 7 : systemctl replacements of legacy commands service and chkconfig
  8. UNIX / Linux : how to force user to change their password on next login after password has reset
  9. “systemd-udevd: Cannot Allocate Memory” and “A start job is running for dev-mapper-\x2droot.device” – CentOS/RHEL 7 booting issue
  10. brctl: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright