Forum: Ruby on Rails Mongrel error on read file after upload

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2009-05-22 11:32
I have a java client that uploads files to a web server.  The problem is
that whenever the client uploads a file, and mongrel saves it in a
temporary file (in this case, mongrel13800-0), mongrel can't read the
file resulting in the error below.

Read error: #<Errno::EACCES: Permission denied -
/home/Jim/work/tmp/mongrel3800-0>

pastie link here: http://pastie.org/486246

i've resolved the problem by setting Mongrel::Const::MAX_BODY to 5MB,
but i don't really like that solution. And I have no control over the
size of the uploads.

i've tried chmod and chown but it doesn't solve the problem. any ideas?
thanks!
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-22 14:11
(Received via mailing list)
On May 22, 10:32 am, Jim ruther Nill <rails-mailing-l...@andreas-
s.net> wrote:
> I have a java client that uploads files to a web server.  The problem is
> that whenever the client uploads a file, and mongrel saves it in a
> temporary file (in this case, mongrel13800-0), mongrel can't read the
> file resulting in the error below.

Does the java code run as a different user than your mongrel ?

Fred
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2009-05-25 02:52
Frederick Cheung wrote:
> On May 22, 10:32�am, Jim ruther Nill <rails-mailing-l...@andreas-
> s.net> wrote:
>
> Does the java code run as a different user than your mongrel ?
>
> Fred

i'll try asking that to the java developers. I have no control over the
java code. i'll keep you posted. thanks!
19fad8b2f5f9948322c3fe0441265298?d=identicon&s=25 Jim ruther Nill (jimboker)
on 2009-05-26 03:13
Jim ruther Nill wrote:
> i'll try asking that to the java developers. I have no control over the
> java code. i'll keep you posted. thanks!

i run the client in the same pc as the server. but it did not solve the
problem. if it helps, using webrick doesn't produce any errors.


one other thing i'm having trouble after the file is uploaded is this
error:

CGI::Session::CookieStore::TamperedWithCookie

after the java client uploads the file to the server, before getting to
the action that will handle the saving of the file, the server sends
this error to the client.  Looking at the request/response, the
session_key sent by the client is different from the session_key sent by
the server as a response.  I looked around for a cause to this, and the
only answer i found is when you change the secret key in your
environment.rb file. and i haven't done that. any clues?
This topic is locked and can not be replied to.