How to enable FTP access for a cPanel account
Configure the File Manager or use the FTP icon to turn on FTP access for a specific domain or user in cPanel. Follow these steps to set up the service and verify connectivity.
You will configure the File Manager interface to allow FTP connections for a specific domain or user account. These steps apply to cPanel 118.x running on a standard Linux hosting stack. You will create a dedicated FTP user and enable the service in the account settings.
Prerequisites
- Root or Reseller access to the cPanel/WHM interface.
- A cPanel account created and active on the server.
- Access to the File Manager via cPanel.
- A valid FTP client installed on your local machine (e.g., FileZilla, WinSCP).
- Knowledge of the cPanel username and the domain name associated with the account.
Step 1: Access the File Manager
Log in to the cPanel interface using your username and password. Locate the File Manager icon in the main dashboard and click it to open the web-based file browser. This tool allows you to manage file permissions and access settings without touching the command line.
https://your-server-ip:2083/cpanel/
Enter your credentials. Once logged in, navigate to the home directory of the account. Look for the icon labeled "FTP" or "FTP Access" in the left sidebar or top menu.
Step 2: Enable FTP Access
Click on the "FTP" icon to open the FTP configuration page. Select the checkbox labeled "Enable FTP" or "Allow FTP access" for the current domain. If you are managing multiple domains, ensure you select the correct domain from the dropdown list if prompted. Click "Save" or "Apply" to commit the changes.
Enable FTP: [x]
Domain: example.com
Save Configuration
The system will update the internal configuration file to permit FTP connections. You will see a confirmation message stating that FTP access has been successfully enabled for the selected domain.
Step 3: Create an FTP User
FTP access requires a specific user account to connect. In the same FTP configuration menu, click "Add FTP User" or "Create User". Enter a unique username for the FTP connection. Set a strong password for this user. Choose the directory where this user should have write permissions, typically the public_html folder.
Username: ftpuser123
Password: SecurePassword123!
Directory: /home/username/public_html
Permissions: Full Access
Review the settings to ensure the user has the correct path. Click "Create" or "Save" to finalize the user creation. The system will generate the necessary system user and link it to the FTP service.
Step 4: Configure Firewall Rules (Optional but Recommended)
Ensure that the FTP ports are open on the server firewall. By default, cPanel uses port 21 for control and a range of ports for data transfer (PASV mode). If you use non-standard ports, configure them in the firewall settings. On AlmaLinux 9 or Rocky Linux, use firewalld to allow the services.
# Allow FTP service
sudo firewall-cmd --permanent --add-service=ftp
# Allow FTP Passive mode ports (optional, usually handled by cPanel)
sudo firewall-cmd --permanent --add-port=40000-40100/tcp
sudo firewall-cmd --reload
This step ensures that external clients can establish a connection. If you are on Ubuntu 24.04, you may need to adjust ufw rules similarly.
Verify the installation
Use an FTP client to test the connection. Open your preferred FTP client, such as FileZilla. Enter the host (your server IP or domain), the FTP username you created, and the password. Click "Quickconnect" or "Connect". You should see the server response indicating a successful login. If the connection is successful, you will see the file list of the public_html directory.
Server: your-domain.com
User: ftpuser123
Pass: SecurePassword123!
Status: Connected
If the client shows a "Connection successful" message, the FTP access is working correctly. You can now upload files or modify the directory structure.
Troubleshooting
Error: 421 Service not available, closing control connection
This error often occurs if FTP is not enabled in the cPanel File Manager settings. Return to the cPanel File Manager, ensure the "Enable FTP" checkbox is checked, and save the changes. Also, verify that the firewall is not blocking port 21.
Error: 530 Permission denied
This indicates that the FTP user does not exist or the password is incorrect. Check the username and password you entered. Ensure the user was created in the cPanel File Manager with the correct domain selected. Verify that the user has the correct permissions on the target directory.
Error: 421 Timeout
This suggests a network issue or that the server is not accepting connections. Check your internet connection. Verify that the server's firewall allows incoming traffic on port 21. Ensure that the cPanel service is running by checking the status of the FTP daemon in the server's terminal.
Error: 500 OOPS: Control connection closed
This error is common with passive mode issues. In your FTP client settings, switch from Passive mode to Active mode, or vice versa. In cPanel, you can configure the passive port range under "FTP Zone Editor" or the specific FTP user settings to match your network configuration.
Permission Denied on specific files
If you can connect but cannot upload files, check the directory permissions. Ensure the directory is set to 755 or 775 and that the group ownership allows the FTP user to write. Use the File Manager to change permissions if necessary.
chmod 755 /home/username/public_html
chown -R ftpuser123:ftpuser123 /home/username/public_html
After making these changes, reconnect your FTP client to verify that write permissions are restored.