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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue