Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx 500 error, permission denied for tmp folder

I got 500 from Django admin, when I tried to upload a photo.

When I inspect the error.log I found:

2014/03/13 23:00:55 [crit] 16478#0: *24 open() "/var/lib/nginx/tmp/client_body/0000000012" failed (13: Permission denied), client: xxxxxxx.xxx, server: xxxxxxx.xxx, request: "POST xxxxxxx.xxx/item/86/ HTTP/1.1", host: "xxxxxxx.xxx", referrer: "http://xxxxxxx.xxx/item/86/"
------------------------------------------------------------------------

What could be wrong here?

like image 211
noooooooob Avatar asked Mar 13 '14 15:03

noooooooob


1 Answers

Phew. Solved. As the error message says, this indeed was just a "Permission" issue.

Check through "/var/lib/nginx/tmp/client_body/" and make sure the permission is correct at each directory level solve the issue.

More details can be found here : http://derekneely.com/2009/06/nginx-failed-13-permission-denied-while-reading-upstream/ and here : Permission Denied error with Django while uploading a file

like image 104
noooooooob Avatar answered Oct 03 '22 22:10

noooooooob