Knowledgebase
Permission Denied error when using CFFTP tag
Posted by zz-James Moir on 21 June 2016 04:06 PM

Issue

When using the CFFTP tag, you receive the error:

"Security: The requested template has been denied access to localhost:1024" occurs.

Cause

FTP supports two connection modes, Active and Passive. Net24's shared hosting servers support passive FTP connections only so an error will result if you attempt to connect with Active.

Solution

Enable Passive mode within every use of the CFFTP tag to force ColdFusion to connect with Passive.

Here is an example:

<cfftp action="open" username="anonymous" connection="My_query" password="myemail" server="remote" stopOnError="yes" passive="yes">
<cfftp action="getfile" stopon remote local connection="My_query" username="anonymous" password="myemail" passive="yes">