CFTP Generating Error when trying to upload

Posted on 2004-10-28
Last Modified: 2013-12-24
When I try and do a simple ftp upload from a form I get the following error message on line 17 (the password is correct by the way):

An exception occurred when performing the FTP putfile operation.
The cause of this exception was that: 550 neotmp25612.tmp: Cannot create file. .
15 : <cfftp action="putfile"
16 : username="username"
17 : password="password"
18 : server="servername"
19 : passive="yes"

Here is the code I am using to do this upload:

<CFIF isdefined ("FORM.Upload")>
<cfftp action="open"
<cfftp action="putfile"
<cflocation url="uploadsermon.cfm?Note=File Succefully Uploaded!">



<cfparam name="URL.Note" default="">
    <strong><font color="RED">#URL.NOTE#</font></strong>

<form action="uploadsermon.cfm" method="post" enctype="multipart/form-data">
<input name="UPLOAD" type="hidden" value="Y">
 Media File Name:<BR>
<INPUT NAME="UploadMe" TYPE="File" SIZE="50">
Sermon Name<br>
<input name="SermonName" type="text" size="50">
<input name="Speaker" type="text" size="50">
<cfset ThisCalMonth = DateFormat(Now(), "MMMM DD, YYYY")>
<input name="DateOfSermon" type="text" value="<cfoutput>#ThisCalmonth#</cfoutput>" size="50">
<input type="Submit" value="Upload Now">

Basically, I am just wanting to have the user be able to upload a file and transfer it to our ftp server. Of course, I can get full access to the ftp server. Any suggestion? Thanks alot!
Question by:swhitlow
    LVL 8

    Accepted Solution


    Your remote file name must be relative to your FTP root directory, e.g. /secret/newsecrectfile.bin

    Your local file is a fully specified path such as C:\OldSecrets\NobodysBusiness.bin

    Also, before you can use a file that has been uploaded to your server, you SHOULD use <cffile action="upload" ...

    Please do a <cfdump var="#UploadMe#"> right before your FTP call and report the output.

    Finally, since your second CFFTP doesn't use the connection created in the first one, you can leave out the first one.

    Author Comment

    Let me try this and I'll get back to you. One thing I did notice while I was looking at the variables is that I get a weird filename - not the one that I chose from the "Browse File" input box. I get the "neotmp25612.tmp" filename instead. Is this because I am not using the <cffile action="upload"> function first?

    LVL 8

    Expert Comment

    Yes. Of course you could use this name to upload the file, but using <cffile action="upload"> is - in my opinion - easier and also gives you additional information otherwise not available. dump the cffile structure after calling the tag and you'll see what I mean ;-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    The Complete Ruby on Rails Developer Course

    Ruby on Rails is one of the most popular web development frameworks, and a useful tool used by both startups and more established companies to build strong graphic user interfaces, and responsive websites and apps.

    A web service ( is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
    Article by: kevp75
    Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now