From: Nightfall_Blue on
I sincerely hope someone here can look at this as I am totally out o my depth.

I have a CMS application which has suddenly stopped uploading files. I
receive the following error message

Security: The requested template has been denied access to
C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp60862
..tmp.
The following is the internal exception message: access denied
(java.io.FilePermission
C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp60862
..tmp read)


It then goes on to say

ColdFusion cannot determine the line of the template that caused this error.
This is often caused by an error in the exception handling subsystem.

Does anyone have any experience of this at all. I am utterly stumped.

THE Form Looks like this... and has worked perfectly until now

<form action="index.cfm/fuseaction/cms.add_image" method="post"
enctype="multipart/form-data" id="addimage" >

<table width="753" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
<th scope="col">&nbsp;</th>
</tr>
<tr>
<th scope="row">NAME</th>
<td>&nbsp;</td>
<td><input name="Image" type="text" size="100" maxlength="255"
/><br/><br/></td>
</tr>
<tr>
<th scope="row">IMAGE THUMBNAIL</th>
<td>&nbsp;</td>
<td><input type="file" name="Thumbnail" size="50"><br/><br/></td>
</tr>
<tr>
<th scope="row">IMAGE</th>
<td>&nbsp;</td>
<td><input type="file" name="FileName" size="50"><br/><br/></td>
</tr>
<tr>
<th scope="row">KEYWORDS</th>
<td>&nbsp;</td>
<td><input name="Keyword" type="text"size="100" maxlength="255"
/><br/><br/></td>
</tr>
<tr>
<th scope="row">ALT TAG</th>
<td>&nbsp;</td>
<td><textarea name="Alt" cols="76" rows="3"></textarea><br/><br/></td>
</tr>
<tr>
<th scope="row">CAPTION</th>
<td>&nbsp;</td>
<td><textarea name="Caption" cols="76" rows="3"></textarea><br/><br/></td>
</tr>
<tr>
<th scope="row">WIDTH</th>
<td>&nbsp;</td>
<td><input name="Width" type="text" size="3" maxlength="3"
/><br/><br/></td>
</tr>
<tr>
<th scope="row">HEIGHT</th>
<td>&nbsp;</td>
<td><input name="Height" type="text"size="3" maxlength="3"
/><br/><br/></td>
</tr>
<tr>
<th scope="row"></th>
<td>&nbsp;</td>
<td>
<input name="submit" type="submit"
onclick="MM_validateForm('Image','','R','Keyword','','R','Width','','RinRange10:
600','Height','','RinRange10:400','Alt','','R','Caption','','R');return
document.MM_returnValue" />
</td>
</tr>
</table>
</form>


The template which is failing (the uploading action template) looks like this


<cfoutput>#FORM.FileName#</cfoutput>

<cftransaction>
<cfoutput>


<cfquery name="add_image" datasource="#datasources.CONTENTDSN#">
INSERT INTO dbo.Image (SiteID, Image, Thumbnail, Filename, DateAdded,
Caption, ALT, Keyword , Width, Height
)

VALUES (
#trim(application.Site_code)#,
'#Trim(FORM.Image)#',

<CFFILE
ACTION="upload"
FILEFIELD="FORM.Thumbnail"

DESTINATION="#getDirectoryFromPath(getBaseTemplatePath())#/images/storyimages/th
umbnails/"
NAMECONFLICT="overwrite"
ACCEPT="image/gif, image/jpeg, image/jpg, image/pjpeg"
>
'#cffile.clientfile#',
<CFFILE
ACTION="upload"
FILEFIELD="FORM.FileName"

DESTINATION="#getDirectoryFromPath(getBaseTemplatePath())#/images/storyimages/"

NAMECONFLICT="overwrite"
ACCEPT="image/gif, image/jpeg, image/jpg, image/pjpeg"
>
'#cffile.clientfile#',
#Now()#,
'#Trim(FORM.CAPTION)#',
'#Trim(FORM.ALT)#',
'#Trim(FORM.KEYWORD)#',

<cfif Isdefined("FORM.WIDTH") AND #FORM.WIDTH# EQ "">
NULL,
<cfelse>
#Trim(FORM.WIDTH)#,
</cfif>

<cfif Isdefined("FORM.HEIGHT") AND #FORM.HEIGHT# EQ "">
NULL
<cfelse>
#Trim(FORM.HEIGHT)#
</cfif>
)
</cfquery>
</cfoutput>
</cftransaction>

From: rmorgan on
Check the permissions on the web root for where the file is to be uploaded to.
Also, someone correct me if I am wrong, check the permissions on the CF install
directory, as I believe file uploads use the install directory temporally until
the upload is complete.

From: Nightfall_Blue on
It is only failing on the live production server and seems to work absolutely
fine here. BUt Im not really sure I understand why that would happen suddenly.
I ahve asked my host and am waiting for a response


From: tclaremont on
This may not be your situation, but it might help others with similar
problems...

We have had this happen before on our intranet. The problem was that the
person who installed CF allowed the CF service to log in using HIS username
and password. As a result, CF had access to everything the installer had access
to.

Following good network security practices, the installers network password
expires every 45 days or something like that. Note, however, that the
permissions problems did NOT coincide with the expiration of the installers
password, so people were stumped.

As it turned out, the login username and password are not validated until the
NEXT TIME the CF service is stopped and started. Thus, the problem did not rear
it's head until there was a need to restart the server. This happened to be
about a month after the installers password actually expired.

As I said, this is not exactly the same as your problem, but it could be a
username/password issue nonetheless, preventing the username and password
combination of the CF service from 'seeing' the directory in question.

From: pcbrown on
[i]The problem was that the person who installed CF allowed the CF service to log in using HIS username and password.[/i]

Sheesh...sounds like something I'd do. Thanks for the tip.