Forum: NGINX nginx upload module bug? (proxy_temp_path ignored)

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.
Wincent C. (Guest)
on 2009-04-29 13:27
(Received via mailing list)
I've just been testing out nginx (0.6.36) and the nginx upload module
(2.0.9) and think I might have discovered a bug.

nginx without the upload module works.

But with the upload module it fails to launch with:

   2009/04/29 11:06:06 [emerg] 83898#0: mkdir() "/usr/local/nginx/
proxy_temp" failed (13: Permission denied)

This is with a simple conf file with no upload module directives added
to it yet.

The conf file has proxy_temp_path lines like this inside the "server"
block:

   proxy_temp_path /Users/wincent/src/tmp/proxy_temp;

So it looks like the upload module is trying to access the default
proxy temp path before reading the "server" config. I tried moving the
proxy_temp_path line out into the "http" block, but I get the same
error.

So it appears that the module doesn't pay any attention to the
proxy_temp_path configuration, which means that I can't use nginx as
an unprivileged user (because the user can't write to the default
proxy_temp_path).

The workaround is to just create the default proxy_temp_path.

But I am wondering if this is a bug. If the upload module wants to
write to the proxy_temp_path, shouldn't it be respecting the
proxy_temp_path settings in the conf file?

Cheers,
Wincent
Valery K. (Guest)
on 2009-05-04 20:24
(Received via mailing list)
Hi Wincent!

It seems that you're right: it's bug. If no upload handler is configured
in location I should prevent module from registering the path.
Unfortunately it's not possible to default this path to value of
proxy_temp_path.

I'll prepare a fix for this problem.

Sorry for late response: I've missed your message in tons of mail.
This topic is locked and can not be replied to.