查看nginx错误日志,日志显示报错
日志所在位置:/usr/local/Cellar/nginx/1.17.3_1/logs/error.log
2021/07/21 14:04:32 [crit] 3126#0: *3195 open() "/usr/local/var/run/nginx/client_body_temp/0000000026" failed (13: Permission denied), client: 127.0.0.1, server: localhost, request: "POST /plat/pss//upload HTTP/1.1", host: "scm.mynatapp.cc", referrer: "http://scm.mynatapp.cc/plat/h5/pages/complaint/complaint"
2021/07/21 14:04:32 [crit] 3126#0: *3195 open() "/usr/local/var/run/nginx/client_body_temp/0000000026" failed (13: Permission denied), client: 127.0.0.1, server: localhost, request: "POST /plat/pss//upload HTTP/1.1", host: "scm.mynatapp.cc", referrer: "http://scm.mynatapp.cc/plat/h5/pages/complaint/complaint"
2021/07/21 14:04:32 [crit] 3126#0: *3195 open() "/usr/local/var/run/nginx/client_body_temp/0000000026" failed (13: Permission denied), client: 127.0.0.1, server: localhost, request: "POST /plat/pss//upload HTTP/1.1", host: "scm.mynatapp.cc", referrer: "http://scm.mynatapp.cc/plat/h5/pages/complaint/complaint"
open() "/usr/local/var/run/nginx/client_body_temp/0000000034" failed (13: Permission denied),
切换到root用户 sudo su
(base) wangheng@localhost nginx % sudo su
sh-3.2# ls
赋权
chmod 777 client_body_temp/
上传成功
image.png
网友评论