[Solved] Infamous "unable to connect to the ftp server"

edited November 2016 in Frequent Questions
Running on Centos7, I've confirmed apache is owner of all files/directories. I've tried using localhost and with no luck. I can ssh to the box and then ftp to both localhost and Not sure what to try next.


  • Did you specify the secure option? Otherwise, there might be an error getting thrown. Check your PHP error logs. You can also open the file /cc-install/ftp.php and on line 82 remove the "@" symbol and try again. Re-check your log files again after doing so.
  • I did not check the secure option. I removed the "@" symbol but still not working. I do not see any errors in the logs.
  • Perhaps it's SELinux. Try this from the command line:

    getsebool httpd_can_network_connect

    If you get off, 0, or no Then turn it on with this command and reboot your server:

    setsebool -P httpd_can_network_connect=1

    You may need root permissions to run that command. Then try again with both and localhost. If both fail, then try disabling SELinux altogether to see if that's causing it. Open the file /etc/selinux/config and set selinux=disabled, save, reboot and try again.
  • setseboot did the trick, thank you very much!
This discussion has been closed.