Java上传文件到linux服务器后没有权限访问(解决)
导致nginx访问403 for nginx访问图片文件没权限
解决方法:
将/etc/nginx/nginx.conf中的第一行改为root
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
把user nginx 修改为user root
user root;
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
评论区