tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: FileUploadBase$IOFileUploadException
Date Thu, 02 Sep 2010 02:15:08 GMT
Hash: SHA1


On 9/1/2010 6:26 PM, Konstantin Kolinko wrote:
> AFAIK, the said threshold determines when a file is too big to be hold
> in memory and should be written to disk.  So, I think that "Permission
> denied" actually comes from your file system.  You have to read the
> docs (or the source code), but I guess that it tries to write to
> ${catalina.base}/temp (aka $CATALINA_TMPDIR, aka ).

Interesting. That would mean that, when the uploaded file exceeds this
threshold (but not the maximum file size allowed for uploads),
commons-fileupload writes the file first to the temp directory, then
probably hands an InputStream object to the consumer that reads from the
file instead of memory.

That sounds like a decent implementation that allows large files to be
uploaded but does not turn into a memory hog.

Paul, what are you doing with these files? Are you saving them onto the
disk? I don't believe commons-fileupload actually promises to write the
files to a particular place on your behalf: I think you have to write
the file somewhere yourself.

Is it possible that when commons-fileupload tries to write to the temp
dir, it doesn't have permission? If you're running Tomcat as a service,
it's current-working-directory might actually be '/', and
commons-fileupload might inherit that as the temp directory if you don't
tell it otherwise.

I think it's worth looking further into this problem, otherwise it might
pop-up again when you try to upload an even bigger file.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message