open() “/var/lib/nginx/tmp/client_body/0000000001” failed (13: Permission denied)
报错:
/var/log/nginx/error.log
open() "/var/lib/nginx/tmp/client_body/0000000001" failed (13: Permission denied)
原因:
nginx用户配置或tmp/
目录用户/用户组配置问题
解决方法:
检查/etc/nginx/nginx.conf
中'user=dreamsky dreamsky'
的配置(根据个人情况)
更改tmp/
目录的用户、用户组和权限
# chown -R dreamsky /var/lib/nginx/tmp/
# chgrp -R dreamsky /var/lib/nginx/tmp/
# chmod -R 755 /var/lib/nginx/tmp/
问题解决。
若仍然报错,可尝试
# chmod -R 777 /var/lib/nginx/tmp/