I've catched the same error on a local website. In logs I found this record:
"nginx failed (13: Permission denied) while reading upstream, client: 127.0.0.1".
My decision through restart of nginx and php-fpm from the right user:
Let's my_user – main user of website's directory.
First, go to nginx.conf:
Change
user nginx; -> user my_user my_user_group;
or paste this
user my_user my_user_group;
on the top of file
2) Second, in php5/fpm/pool.d/www.conf
# Find and change this variables from old -> to new:
user -> my_user
group -> my_user
listen.owner -> my_user
listen.group -> my_user
3) And finally you need restart of nginx and php-fpm. Then make chown 0700 in handmode for /var/lib/nginx/tmp for my_user, like this:
chown -R my_user:my_user 0700 /var/lib/nginx/tmp