Nginx permission denied for tmp directory (with correct user)

nginxWordpress

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

Best Answer

Use the following command to fix the permission of nginx folder.

sudo chmod -R 775 /var/lib/nginx/tmp

Hope it helps.