How to Edit FTP Server Configuration from the Command Line?

Overview

This document explains how to manually edit the FTP server’s configuration from the command line.

Determine your FTP server

To determine which FTP server your server uses, log in to your server via SSH as the root user and run the following command:

grep ftpserver /var/cpanel/cpanel.config

You will receive one of the following two results:

1
2
ftpserver=proftpd
ftpserver=pure-ftpd

Follow the instructions below that correspond to your FTP server type.

Pure-FTP configuration

To edit the FTP configuration for Pure-FTP, perform the following steps:

  1. Use your preferred text editor to create or edit the /var/cpanel/conf/pureftpd/local file.
  2. Enter your changes in the local file. For example, to set the ForcePassiveIP setting to the IP address, enter the following in the local file:
    ForcePassiveIP: 203.0.113.0
    • To clear that value, change the local file to use the following setting:
      ForcePassiveIP: ~
  3. To apply your changes, perform a force update of FTP with the following command:
    /scripts/setupftpserver pure-ftpd --force

ProFTP Configuration

To edit the FTP configuration for ProFTP, perform the following steps:

  1. Use your preferred text editor to create or edit the /var/cpanel/conf/proftpd/local file.
  2. Enter your changes in the local file.
  3. To apply your changes, perform a force update of FTP with the following command:
    /scripts/setupftpserver proftpd --force
  • FTP Server, Configure FTP, FTP Configuration
  • 113 Users Found This Useful
Was this answer helpful?

Related Articles

How to Configure Your SFTP Client ?

Overview This document provides the information to connect to your cPanel account via SFTP (SSH...

How to Deny FTP Access ?

Overview If the /etc/ftpusers file exists on your server, cPanel & WHM denies FTP access to...

How to Enable FTP Passive Mode ?

Overview This document explains how to use the active or passive mode to connect to a File...

How to Restore Missing FTP Interfaces in cPanel ?

Overview Warning: This document describes an unsupported workaround. We do not guarantee that...

Passive FTP and NAT Configuration Temporary Workaround ?

Overview cPanel & WHM’s implementation of PureFTP and ProFTPd causes an issue on...