IF FTP Dosnt Work through PHP SCRIPT but Does Work through command line THEN follow the steps

FTP

run through root login

Check your status by running:

getsebool httpd_can_network_connect

If you get:

httpd_can_network_connect –> off

This may be your issue.

The Fix :

` Enable httpd_can_network_connect by running:

setsebool httpd_can_network_connect=1

Test your script again and see if it works. This worked for me so I made sure to set a policy to keep this enabled.

setsebool -P httpd_can_network_connect=1

NOTE: -P sets the policy so it persists over a reboot

Leave a Reply

Your email address will not be published. Required fields are marked *