commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Johansson <johansson.s...@gmail.com>
Subject Re: [fileupload]java.io.fileNotFoundException : /home/abc/xyz.jpg (Permission denied)
Date Sun, 03 Feb 2013 20:47:14 GMT
On Sun, Feb 3, 2013 at 5:23 PM, arvind viswanathan <
arvind.viswanathan@gmail.com> wrote:

> Hi,
>  I am running tomcat7 instance in amazon linux. I am encountering the above
> message when using file upload in my application deployed in it. I get the
> following message.
> java.io.fileNotFoundException : /home/abc/xyz.jpg (Permission denied)
>  when trying to save the image in /home/abc/
>

My guess would be that you are running Tomcat as a different user than the
one owning the home directory you are trying to write to.

In that case it doesn't really have anything to do with tomcat or
fileupload.

Try saving the uploaded files to some common directory. Create a directory
called.. say, /opt/myapp . give full access to everything and everyone by
issuing the command "sudo chmod 777 /opt/myapp".

Or if you are really sure that it's what you want to do, you could just go
ahead
and give the user running tomcat access to write in /home/abc.

/S

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message