open() client_body_temp Permission denied
nginx.conf 设置 userwww www;权限不够 client_body_temp 无法上传图片,还要改哪里?client_body_temp 改 WWW.WWW 777 还是不行./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/conf.d --with-mysql-sock=/tmp/mysql.sock --with-mhash --with-openssl --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-gd --with-iconv --with-zlib --with-zip --enable-inline-optimization --disable-debug --disable-rpath --enable-shared --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbregex --enable-mbstring --enable-ftp --enable-intl --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --without-pear --with-gettext --with-xsl --enable-session --with-curl --with-jpeg --with-webp --with-freetype --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --without-gdbm --enable-fast-install --enable-exif --with-ldap --with-ldap-sasl --with-bz2 --with-sodium --with-imap --with-imap-ssl --with-kerberos 2>&1 | tee /root/php.log ./configure --prefix=/usr/local/nginx --user=www --group=www --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module --with-stream_ssl_preread_module --with-compat --with-pcre-jit 2>&1 | tee /root/nginx.log
lnmp的话默认 client_body_temp 应该是 /usr/local/nginx/client_body_temp/
chown www:www -R /usr/local/nginx/client_body_temp/ 请教 @licess
已经设置了:chown www:www -R /usr/local/nginx/client_body_temp/
但就是无法生成临时文件,导致post表单时nginx报500
但如果用user root启动nginx,就可能正常缓存。
可能会是哪里的原因??
谢谢!
补充内容 (2023-10-7 09:35):
用user root启动nginx,就可以生成缓存。 谢谢 @licess,问题已经解决。将整个目录 /usr/local/nginx 给www后,问题得到解决。
页:
[1]