# Nginx truncate my data

**URL:** <https://www.ruby-forum.com/t/nginx-truncate-my-data/200026>\
**Category:** NGINX\
**Created:** [December 3, 2010, 5:17am UTC](https://www.ruby-forum.com/t/nginx-truncate-my-data/200026 "2010-12-03T05:17:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [December 3, 2010, 5:17am UTC](https://www.ruby-forum.com/t/nginx-truncate-my-data/200026/1 "2010-12-03T05:17:57Z")

</div>

I need to output large data, but nginx will truncate it.  
I test it with nginx 0.7.67  
when the data is more than 40K, I could only get part of it, using curl  
apache is the backend of nginx, so I also test apache using curl  
directly,  
and everything is OK.  
So I think it’s nginx who eat my data.  
I have closed gzip, and nothing changed.  
Do you have any idea?

---

<div class="post-metadata">

**Author:** ![Spacelee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@Spacelee](https://www.ruby-forum.com/u/Spacelee)\
**Post date:** [December 3, 2010, 5:29am UTC](https://www.ruby-forum.com/t/nginx-truncate-my-data/200026/2 "2010-12-03T05:29:55Z")

</div>

You don’t need to double-post, forum messages get sent to the list.  
The latest stable version is 0.8.53, try that first.  
Check your error log.  
Snippets of your config might be of use.

---

<div class="post-metadata">

**Author:** ![Spacelee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@Spacelee](https://www.ruby-forum.com/u/Spacelee)\
**Post date:** [December 3, 2010, 5:43am UTC](https://www.ruby-forum.com/t/nginx-truncate-my-data/200026/3 "2010-12-03T05:43:07Z")

</div>

Sorry for duplicated posts.

the log is like this  
2010/12/03 12:34:58 [crit] 27861#0: \*3495 open()  
“/opt/local/nginx80/proxy\_temp/6/01/0000000016” failed (13: Permission  
denied) while reading upstream, client: XX.XX.XX.XX, server:  
[api.yangfanbook.beta.sina.com.cn](http://api.yangfanbook.beta.sina.com.cn), request: “POST  
/api.php/invoice\_list\_get  
HTTP/1.1”, upstream: “[http://127.0.0.1:6080/api.php/invoice\_list\_get](http://127.0.0.1:6080/api.php/invoice_list_get)”,  
host:  
“[api.XX.beta.XX.com.cn](http://api.XX.beta.XX.com.cn)”

I got it, it’s the permissions of proxy\_temp, when I change it to 777,  
it’s  
OK now.

but can I change the permissions to 777 ? is there any security issues?

the permissions of nginx :  
drwxr-xr-x 9 root root 4096 Dec 3 11:44 .  
drwxr-xr-x 9 root root 4096 Nov 5 17:31 …  
drwx------ 2 nginx80 root 4096 Dec 2 14:53 client\_body\_temp  
drwxr-xr-x 2 root root 4096 Dec 3 11:59 conf  
drwx------ 2 nginx80 root 4096 Nov 5 17:31 fastcgi\_temp  
drwxr-xr-x 2 root root 4096 Dec 3 11:49 html  
drwxr-xr-x 2 root root 4096 Dec 3 12:00 logs  
drwxrwxrwx 12 nginx80 root 4096 Nov 5 17:31 proxy\_temp  
drwxr-xr-x 2 root root 4096 Dec 3 11:49 sbin

and the permission of my file is httpd6080.webdev because we use apache  
as  
the bankend.

What should I do?

2010/12/3 Nuno Magalhães [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Spacelee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@Spacelee](https://www.ruby-forum.com/u/Spacelee)\
**Post date:** [December 3, 2010, 5:53am UTC](https://www.ruby-forum.com/t/nginx-truncate-my-data/200026/4 "2010-12-03T05:53:45Z")

</div>

On Fri, Dec 3, 2010 at 04:42, Spacelee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> but can I change the permissions to 777 ? is there any security issues?

You have an nginx80 user, and it owns proxy\_temp, so i guess 750 (rwx  
r-x —) would be enough.

–  
Mars 2 Stay!

> **[Golden Hammer](https://xkcd.com/801/)**

/etc
