This topic summarizes common issues and solutions for setting up an FTP site. It helps you quickly troubleshoot issues with FTP service installation, configuration, security, and connections to ensure your FTP site is stable and secure.
Troubleshooting FTP file downloads
Follow these steps to enable download permissions in Internet Explorer.
-
On your on-premises host, open Internet Explorer.
-
In the upper-right corner of the browser, click the
icon, and then click Internet options. -
In the Internet options dialog box, click the Security tab.
-
In the Select a zone to view or change security settings area, click Internet. Then, in the Security level for this zone area, click Custom level.
-
In the settings list, find , and then click OK.
-
Click Application, and then click OK.
Resolving FTP connection errors
Troubleshoot the issue based on the FTP error message. If the error is difficult to resolve, consider using a third-party FTP client, such as FileZilla. You can download it from the official FileZilla website. The following example shows how to use FileZilla to connect to an FTP server in anonymous mode.
-
Configure vsftpd to run in anonymous mode.
-
Run the following command to edit the
/etc/vsftpd/vsftpd.confconfiguration file.If you installed vsftpd by using the
apt install vsftpdcommand, the configuration file is located at/etc/vsftpd.conf.sudo vim /etc/vsftpd/vsftpd.conf -
Press
ito enter Insert mode. -
Uncomment the anonymous upload setting and change it to
anon_upload_enable=YES. -
Press
Escto exit Insert mode. Then, enter:wqand press Enter to save and close the file.The modified configuration file is shown as follows:
# Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=YES # # Uncomment this to allow local users to log in. # When SELinux is enforcing check for SE bool ftp_home_dir local_enable=YES # # Uncomment this to enable any form of FTP write command. write_enable=YES # # Default umask for local users is 077. You may wish to change this to 022, # if your users expect that (022 is used by most other ftpd's) local_umask=022 # # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. # When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access anon_upload_enable=YES # -
Run the following command to grant FTP users write access to the
/var/ftp/pubdirectory.The
/var/ftp/pubdirectory is the default file directory for the FTP service.sudo chmod o+w /var/ftp/pub/ -
Run the following command to restart the vsftpd service and apply the configuration.
sudo systemctl restart vsftpd
-
-
Download and install FileZilla.
-
Use FileZilla to connect to the FTP server in anonymous mode.
-
Open the FileZilla client.
-
From the top menu bar, choose .
-
In the lower-left corner of the Site Manager dialog box, click New site.
-
Enter a name for the new site and configure its settings.
NoteThe following interface is for FileZilla version 3.64.0. Your interface might differ depending on the version.
The following list describes the configuration parameters:
-
New site name: Enter a custom name for your site. For example,
test-01. -
Protocol: Select FTP - File Transfer Protocol.
-
Host: Enter the public IP address of your Linux instance, such as
121.43.XX.XX. -
Port: 21.
-
Logon Type: Select Anonymous.
This example connects to the FTP server in anonymous mode. If you want to connect with a username and password, set Logon Type to Normal and enter the user credentials.
-
-
Click Connect.
After a successful connection, you can upload, download, and delete files. The following table describes the labeled regions in the FileZilla interface.
Number
Description
①
Displays commands, FTP connection status, and task results.
②
Local site: Displays the directory structure of your on-premises host.
③
Remote site: Displays the directory structure of the FTP server. In anonymous mode, the default directory is
/pub.④
Transfer queue: Displays the file transfer queue and log messages.
-
Adding the Everyone user to permissions
If the Everyone user is not listed on the Security tab when you set folder properties, follow these steps to add it.
-
On the Security tab, click Edit.
The Group or user names list shows only CREATOR OWNER, SYSTEM, Administrators, and Users, without the Everyone option.
-
In the new window, click Add.
-
In the next window, click Premium.
-
Click Find Now. From the search results, select Everyone and click OK.
-
Click OK to return to the permissions window.
-
Click OK to finish adding the user.
Creating a server certificate
To use a secure file transfer protocol such as FTPS or SFTP, you need a server certificate to encrypt the FTP session. This protects data from interception or tampering during transmission.
-
In Server Manager, navigate to .
-
In the ServerId pane on the left, click the server name. Then, on the server's home page, double-click Server Certificates in the IIS section.
-
In the Actions panel on the right side of the Server Certificates page, click Create Self-Signed Certificate.
-
Specify a friendly name for the certificate, select a certificate store, and then click OK. For example, enter
SSL-FTPfor the certificate name and select Personal for the certificate store. -
After the certificate is created, it appears on the Server Certificates page. The certificate name is
SSL-FTPand the certificate store is Personal.
Configuring FTP passive mode ports
When you configure FTP passive mode, we recommend that you specify a port range instead of a single port. This helps balance performance, concurrent connections, and security. The primary reasons for opening a port range are:
-
Support concurrent connections
-
A port range allows multiple clients to transfer data simultaneously. Each transfer uses one port, so multiple ports can support multiple concurrent connections.
-
If your FTP server must serve many concurrent users, a sufficiently wide port range is crucial to prevent connection delays or rejections.
-
-
Increase network flexibility
-
In large, high-traffic environments like enterprises or data centers, ports often need dynamic allocation to handle different request types and traffic patterns.
-
A larger port range helps ensure stable connections under various network conditions, such as in load balancing environments or across different subnets.
-
Configuration
-
Assess concurrency needs
-
Estimate the maximum number of concurrent connections that you need to support. A wider port range is better for environments with many users or heavy data transfers.
-
For small networks or those with few users, a smaller port range may be sufficient.
-
-
Choose an appropriate port range
-
For small to medium-sized businesses, a port range of 100 to 200 ports is typically sufficient for common concurrency needs.
-
For high-traffic environments, you can specify a larger port range. Consider running load tests to determine the optimal size.
-
-
Implement security measures
-
Use firewall rules to restrict access to the passive port range to only trusted hosts or networks.
-
Enhance security by enabling IP and user blacklist and whitelist features.
-
-
Monitor and adjust
-
Implement real-time monitoring of port usage. Use monitoring tools and log analysis to detect unusual activity or traffic patterns.
-
Adjust the port range or security policies based on monitoring data to better align with your business requirements.
-
-
Automate and simplify management
-
Use configuration management tools, such as Ansible or Puppet, to automate port settings and security policy deployment. This reduces the risk of manual configuration errors.
-
Incorporate port range configuration into your regular review and update process to ensure it adapts to changing business needs.
-
-
Use secure protocols
-
Whenever possible, use FTPS or SFTP to encrypt data in transit. This is especially important when transferring sensitive information.
-