• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

After upgrade to CF9, CFIMAGE "Unable to create temporary file" error

New Here ,
Jun 18, 2010 Jun 18, 2010

Copy link to clipboard

Copied

We recently upgraded from CF8 to CF9 Enterprise.  I'm getting an "Unable to create temporary file" error on

my CFIMAGE resize calls.  We use sandbox security.  I assume I need to grant write access to whatever folder CF uses for temp files, but which folder is it?   The same code (and sandbox settings) ran fine in CF8....

Note, if I attempt to add C:\JRun4\servers\cfusion\SERVER-INF\temp to the sandbox for this particular app, CF crashes on all requests across all apps on the server with a:

Security: The requested template has been denied access to C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.class.
The following is the internal exception message: access denied (java.io.FilePermission C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfclasses\cfapp2ecfc1510154633.class read)

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

I need to restart CF to get everything working again.

Views

6.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 18, 2010 Jun 18, 2010

Copy link to clipboard

Copied

It appears to be a corrupt security sandbox issue.  After any change to any sandbox (i.e., adding/removing paths from sandboxes), causes the server to throw errors on every request until the CF service is restarted.  It appears there's a bug in the sandbox security migration wizard from CF8 to CF9.

Since I recreated the sandbox from scratch, all is well again.  CFIMAGE is not throwing the error any longer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 13, 2010 Jul 13, 2010

Copy link to clipboard

Copied

Just a bit more related information that might help someone else searching for a solution...  at http://www.cfexecute.com/post/coldfusion-verity-unable-to-create-temporary-file I found this tidbit:

"Turns out that if you are using Sandbox Security you'll need to add the value of the GetTempDirectory function to your Sandbox with read and write permissions and it will start working again."

... and indeed if I add:

C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\

to my sandbox with Read, Write (and I figure Delete permissions, because how will the system remove the temp file otherwise?), the CFIMAGE resize doesn't throw the error any more.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 17, 2010 Aug 17, 2010

Copy link to clipboard

Copied

Another update.   Had a problem with a sandboxed CF9 site doing a simple CFIMAGE READ to a memory variable.  Got an "Unable to create temporary file" error.

Inserted the following code in the file upload page:

<cfscript>
writeoutput("Temp Dir : " & createobject("java","java.lang.System").getProperty("java.io.tmpdir") );
</cfscript>

... and it reveals the temp directory as C:\WINDOWS\TEMP.  Added that to the sandbox, and the CFIMAGE READ is working properly now.

Note this seems inconsistent with CFIMAGE RESIZE behavior which appears to use the CF GetTempDirectory() value, which in my case is C:\JRun4\servers\cfusion\SERVER-INF\temp\cfusion-war-tmp\

For reference, see the section "Sandbox Considerations" at this link:

http://help.adobe.com/en_US/ColdFusion/9.0/Admin/WSc3ff6d0ea77859461172e0811cbf364104-7fc8.html#WSc3ff6d0ea77859461172e0811cbf364104-7fcc

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 16, 2013 May 16, 2013

Copy link to clipboard

Copied

LATEST

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation