# Nginx permission denied for tmp directory (with correct user)

**URL:** <https://www.ruby-forum.com/t/nginx-permission-denied-for-tmp-directory-with-correct-user/235176>\
**Category:** NGINX\
**Created:** [June 4, 2013, 5:18am UTC](https://www.ruby-forum.com/t/nginx-permission-denied-for-tmp-directory-with-correct-user/235176 "2013-06-04T05:18:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [June 4, 2013, 5:18am UTC](https://www.ruby-forum.com/t/nginx-permission-denied-for-tmp-directory-with-correct-user/235176/1 "2013-06-04T05:18:21Z")

</div>

Whenever I submit a long post from within wordpress, I get the following  
error:

2013/06/04 03:04:19 [crit] 12248#0: \*491 open()  
“/var/lib/nginx/tmp/client\_body/0000000008” failed (13: Permission  
denied)  
It works fine if the post isn’t that long, but submitting a long one  
throws a 500 error on the front end, and this in my error log file 😕

I tried googling and nothing is much help, other than to change the user  
or something

Right now I already have…

/var/lib/nginx/tmp/client\_body owned by www:www (nginx) and set to 700  
permissions

---

<div class="post-metadata">

**Author:** ![Travis\_Maxwell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/4da419/32.png) [@Travis\_Maxwell](https://www.ruby-forum.com/u/Travis_Maxwell)\
**Post date:** [June 4, 2013, 5:46am UTC](https://www.ruby-forum.com/t/nginx-permission-denied-for-tmp-directory-with-correct-user/235176/2 "2013-06-04T05:46:58Z")

</div>

On Mon, 2013-06-03 at 23:17 -0400, Travis Maxwell wrote:

> Right now I already have…
> 
> /var/lib/nginx/tmp/client\_body owned by www:www (nginx) and set to 700  
> permissions  
> This is usually caused by user www not having read/execute ( well,  
> technically just execute but that’s a bit of a pain to use ) access to  
> one of the parent directories.

I expect the file is only used when temp storage is needed for the  
fastcgi php access, so it may be worth increasing those resources too.

hth,

Steve

–  
Steve H. BSc(Hons) MNZCS

> **[Linux & Admin Support Services | "Services provided by people who are proud...](https://www.greengecko.co.nz)**
>
> Offers linux support services, systems and database administration, consultancy and the full development lifecycle for open source - based solutions

Linkedin: [http://www.linkedin.com/in/steveholdoway](http://www.linkedin.com/in/steveholdoway)  
Skype: sholdowa

---

<div class="post-metadata">

**Author:** ![Travis\_Maxwell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/4da419/32.png) [@Travis\_Maxwell](https://www.ruby-forum.com/u/Travis_Maxwell)\
**Post date:** [June 4, 2013, 5:58am UTC](https://www.ruby-forum.com/t/nginx-permission-denied-for-tmp-directory-with-correct-user/235176/3 "2013-06-04T05:58:40Z")

</div>

Thanks! that worked 🙂

I didn’t think about parent directories
