How to Upload Files with FTP

This article explains how to upload and download files using FTP through both third‑party clients and the command‑line interface. It also covers how to connect to an FTP server, required credentials, file transfer commands, and advanced ProFTPD host access control configuration for restricting FTP access by IP address.

FTP UploadFTP Command LineProFTPD Access Control

~3 min read • Updated Feb 24, 2026

1. Overview


This guide explains how to upload and download files using FTP through a third‑party client or the command‑line interface. It also includes advanced configuration for ProFTPD Host Access Control.


2. Connect to an FTP Server with a Third‑Party Client


To connect using a third‑party FTP client, follow these steps:


  1. Create an FTP account in cPanel’s FTP Accounts interface.
  2. Click Configure FTP Client next to the desired account.
  3. If a configuration file is available (e.g., for Cyberduck® or WinSCP), download and open it.
  4. If no configuration file is provided, configure the client manually using the following details:

  • Server Protocol: FTP
  • Server Name: Domain name or server IP
  • Username: Must match the exact format shown in cPanel
  • Password: Your FTP password
  • Port: Defaults to 21

Important: The username must match the exact format shown in cPanel, such as [email protected].


3. Connect to an FTP Server from the Command Line


  1. Open a CLI window on your local machine.
  2. Enter the ftp command:

ftp

  1. Enter open to start a connection:

ftp> open

When prompted, enter your server’s IP address:


(to) 0.0.0.0

You will see a response similar to:


220———- Welcome to Pure-FTPd [privsep] [TLS] ———-
Name (0.0.0.0:example):

Enter your FTP username and password. If successful:


230 OK. Current restricted directory is /.

If login fails:


530 Login authentication failed

4. Upload a File from the Command Line


After connecting to the FTP server:


  1. Navigate to the destination folder using cd:

ftp> cd public_html

  1. Use the put command to upload a file:

ftp> put localmachine:\unfinished-documents\finalized-doc.txt

Important: Files must be uploaded to public_html to be visible on your website.


5. Download a File from the Command Line


  1. Navigate to the file’s directory:

ftp> cd public_html/finalized-documents

  1. Use the get command:

ftp> get document-with-a-mistake.txt

6. ProFTPD Configuration for Host Access Control


This section explains how to configure ProFTPD to restrict FTP access by IP address using Host Access Control.


Warning: This is an unsupported workaround and may not work in future versions.


System Requirements


  • ProFTPD version 1.3.3 or later
  • mod_wrap module installed

Verify installation:


proftpd -V | awk '/Version/ {print $0}; /mod_wrap/ {print "mod_wrap is installed"}'

7. Create a VirtualHost Container


  1. Edit the /etc/proftpd.conf file and add:

TCPAccessFiles /etc/hosts.allow /etc/hosts.deny
TCPServiceName ftp

Warning: Both hosts.allow and hosts.deny must be specified.


  1. Restart ProFTPD:

/usr/local/cpanel/scripts/restartsrv_proftpd

  1. Add deny rules to /etc/ftpusers.
  2. Test the configuration by logging in.

8. Example VirtualHost Container


<VirtualHost 10.1.1.1>
 ServerName ftp.testserver.tld
 AuthUserFile /etc/proftpd/wcraft
 MaxClients 3 "Sorry, this ftp server has reached its maximum user count (%m). Please try again later"
 DirFakeGroup On ftpgroup
 DirFakeUser On ftpuser
 DefaultRoot ~
 TCPAccessFiles /etc/hosts.allow /etc/hosts.deny
 TCPServiceName ftp
</VirtualHost>

Written & researched by Dr. Shahin Siami