Discussion:
File upload: Frustrating error!
(too old to reply)
parkerst
2008-01-30 14:06:12 UTC
Permalink
FYI: Coldfusion MX7.0.2 i believe

ok, so i've got a number of websites for clients that have upload pages and
for some reason today, every time a user clicks submit (on a multipart form
with a cfinput type=file field) I get the following error...nothing else.
--

500 The system cannot find the path specified
The system cannot find the path specified

--
I've tried the following fixes;
Solution: Rebooting the Server
Outcome: I can upload about 5-10 files, then the server starts returning the
error again, server wide, just not on one site.

Solution: Setting permissions for the cfusionMX directory to be as loose as
possible
Outcome: No change

Solution: reInstalling the latest JRE
Outcome: No change

Solution: I used c:\test.txt as a test to see if it was local
Outcome: no change

Solution: I used a number of other dev machines to determine if it was server
side, on different networks
Outcome: no change

Also:
I checked getTempDirectory() in a number of places..it never goes null.

The uploads worked before today. I've had them working for months. nobody has
changed them.

I've been trying to work out the solution for hours, please help :'(
JR "Bob" Dobbs
2008-01-30 16:04:45 UTC
Permalink
Please post your code the error information from the ColdFusion log and/or page generating the error message. Without this information it will be difficult for forum users to help you.
parkerst
2008-01-30 21:44:45 UTC
Permalink
i created a no brainer of a page to test it and still i get the 500 error.
---- UploadForm.cfm
<form name="form1" enctype="multipart/form-data" method="post">
<input type="file" name="theFile"/>
<input type="submit" />
</form>
----

---- Result: Onsubmit
<head><title>JRun Servlet Error</title></head><h1>500 The system cannot find
the path specified</h1><body>
The system cannot find the path specified</body>
----

---- Log
"Error","jrpp-1","01/31/08","00:43:25","cruiseco","The destination
""C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\\""
specified in the CFFILE tag is invalid.<br>The destination either does not
exist or is not accessible by this tag. The specific sequence of files included
or processed is: "C:\CFusionMX\wwwroot\[clientName]\uploadForm.cfm "
----

however, like i said, after reboot, it works fine for a few files :(
JR "Bob" Dobbs
2008-01-30 21:50:55 UTC
Permalink
Items to consider.

1. Is there a problem with the account that the CF application server service
runs as?

2. "C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\\"
notice the extra(?) trailing slash on the path. That might indicate that the
wrong path is being looked for.

3. Do you have any sandbox security settings that might be limiting access?
parkerst
2008-01-30 22:11:28 UTC
Permalink
1. the user, being default, is sfserverprocess. Are you suggesting i run it as
say..administrator?

2. I did notice the extra \, but what would be causing that. Also, i can't
work out where you set the temp dir, i can find no documentation on it, so i
can't exactly do anything about that.

3. The sandbox security is all default, and to be frank, i don't know how to
change them.
JR "Bob" Dobbs
2008-01-30 22:26:44 UTC
Permalink
[Q]1. the user, being default, is sfserverprocess. Are you suggesting i run it
as say..administrator?[/Q]
I wouldn't run it as an administrator, but you might check that the account
has all the neccessary permissions to the directories it is trying to access.


[Q]2. I did notice the extra \, but what would be causing that. Also, i can't
work out where you set the temp dir, i can find no documentation on it, so i
can't exactly do anything about that.[/Q]
Does your CFFILE tag use GetTempDirectory() to specify a location for files?
Is the extra '/' being added there?

Since this problem has only recently started consider any changes made to the
server that might be causing your issue: patches, anti-virus, network
configuration settings, etc. (This is a shot in the dark)
parkerst
2008-01-30 22:34:44 UTC
Permalink
No not at all.

The way I determine the location for the target document was like so;
thisDir =
listDeleteAt(cgi.PATH_TRANSLATED,listLen(cgi.PATH_TRANSLATED,"\"),"\");
docDir = thisDir & "\documents";

then later, the cffile (not contained in a cfc, because i heard that causes
numerous errors) uses destination="#docDir#" etc

However, I know for a fact that the destination directory is not the issue
because its happening on submit of the form, even if i comment out the cffile
script, so it has something to do with the tempDirectory.

Also, i was checking with my boss about what he might have done with the
server (he has a tenancy to mess with things he doesn't really understand)
however, he'll swear black and blue he did nothing to it.

The only thing I can think of is to roll back the server to before the issue
and check any windows/iis6 updates that have impact on permissions.
JR "Bob" Dobbs
2008-01-30 22:40:26 UTC
Permalink
This link may help you review your CF service account's permissions
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17279&sliceId=2
parkerst
2008-01-30 22:59:50 UTC
Permalink
thats really odd. After giving explicit permissions to cfserverprocess to the registry, and to all the listed files, the problem was no more. Thanks :D
Continue reading on narkive:
Loading...