There are typically only two reasons why FTP is inaccessible:
- The FTP service is not running; or
- Access is being limited by network or firewall
Typically, the second reason is the most common problem, however we will take you through how to validate the FTP service is running appropriately before looking at the firewall.
Check if the FTP service is running
Firstly, we should check if the FTP service is running appropriately.
- Login to SSH as root user on the server where MediaCP software is installed
- Check the services status by running the below command:
mediacp status
- If everything is running normally then you should see output similar to the below
root@demo:~# mediacp status
Web server is running (10832)
PHP is running (4150)
MySQL database is running (24332)
FTP service ProFTPd is running (20123)
Redis service is running (20119)
Queue Manager is running (26917)
Nginx RTMP server is running (19523) - Should you see any errors, or "is not running" next to the FTP service then you can restart the ftp service with the following command
mediacp restart ftp
- Check the services status again to see if the FTP service is now running by running the below command:
mediacp status
At this point, if all services are displayed as "running" then the problem is likely due to the firewall. We have an excellent KB for firewall issues, it focuses on port 2020 but everything it mentions, and all of the commands are still relevant if you change the port from 2020 to 2121. https://www.mediacp.net/portal/index.php/knowledgebase/88/Unable-to-access-MediaCP-on-port-2020.html
If FTP is still not running
If FTP is still not running, then something is preventing the service from starting. The following guide will help you identify what is causing the service to not run.
There is no firewall and the service is running but the FTP login username and password is not working.
The following guide will help you regenerate all FTP account logins.