-
1. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
nbelaevski Jul 19, 2009 2:21 PM (in response to nimo22)Hi,
Evidently, temp files directory is not writable. Either make it writable or set file upload to use memory and not disc files only. -
2. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
nimo22 Jul 20, 2009 6:16 PM (in response to nimo22)Hello,
yes, indeed, tmp-file is not writeable. In linux, where the uploaded items normally are stored? In "/root/tmp" or in "usr/tmp" or in "var/tmp" ?
(I have to use "create-temp-file" as I have to upload large files.) -
3. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
nbelaevski Jul 21, 2009 4:41 AM (in response to nimo22)Hi,
It should be TMP environment directory. java.io.File.createTempFile(String, String) is used to create these files. -
4. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
nimo22 Jul 21, 2009 5:58 AM (in response to nimo22)hi,
It should be TMP environment directory. java.io.File.createTempFile(String, String) is used to create these files.
hmm..but I guess, thats the problem because of common security restrictions under linux.
Imagine using a dedicated Server from a Hoster(with Plesk) with Linux.
Doing a upload from a web-client and writing to the tmp-file of the servers root-folder TMP is forbidden.
Why not using the "var/www/tmp" when uploading tmp-files from a web-client, this would work.
Would also be nice to provide a rich:fileUpload property "copyTmpFilesTo".
Or am I wrong? -
5. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
nbelaevski Jul 21, 2009 8:00 AM (in response to nimo22)Hi,
I've created https://jira.jboss.org/jira/browse/RF-7547 on that. -
6. Re: org.ajax4jsf.exception.FileUploadException: Could not cr
alexsmirnov Jul 22, 2009 8:50 PM (in response to nimo22)RichFaces uses Jave createTempFile system call that should use OS default place. As Nick already wrote, in linux that value should be given from TMP or TEMP environment variable , which seems undefined for your server.
In the properly configured system that folder has special flag that tell OS to give rights for files in that directory for creator only to avoid security problems.
Make component property for file upload directory seems as bad idea, because that not a presentation but deployment-dependend parameter and should be set as an application config parameter.
It would be better to introduce such parameter for a upload directory in addition to choose between a temp directory and memory.