# Nginx upload module bug? (proxy\_temp\_path ignored)

**URL:** <https://www.ruby-forum.com/t/nginx-upload-module-bug-proxy-temp-path-ignored/166768>\
**Category:** NGINX\
**Created:** [April 29, 2009, 11:27am UTC](https://www.ruby-forum.com/t/nginx-upload-module-bug-proxy-temp-path-ignored/166768 "2009-04-29T11:27:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wincent\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Post date:** [April 29, 2009, 11:27am UTC](https://www.ruby-forum.com/t/nginx-upload-module-bug-proxy-temp-path-ignored/166768/1 "2009-04-29T11:27:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Wincent\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Post date:** [May 4, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/nginx-upload-module-bug-proxy-temp-path-ignored/166768/2 "2009-05-04T18:24:43Z")

</div>

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.
