summary
The file download failed when testing the project
Check the problem
After investigation, it is found that nginx
gives error information
open() "/ home/server/nginx/fastcgi_ Temp/2/10/0000000102 "failed (13: permission denied) while reading upstream
nginx
prompts us that we do not have permission to operate
and then we enter the directory /home/server/nginx
to check fastcgi_ Temp
file owner, our name is the root user of root group
we will check the user group and user name of nginx worker
again
ps -ef | grep nginx
# We can see that the worker process of nginx is the www user
root 80246 1 0 10:37 ? 00:00:00 nginx: master process /home/server/nginx/sbin/nginx
www 80247 80246 0 10:37 ? 00:00:00 nginx: worker process
root 82877 82840 0 13:56 pts/7 00:00:00 grep --color=auto nginx
# View the group that the www user is in, and the members of the group
groups www
# Ours is the www user of the www user group
www:www
solve the problem
When we download, the nginx worker
process is sending the fastcgi_ Temp
does not have permission to write to the cache
so we just need to give fastcgi_ The start-up user with the permission of
directory nginx
to modify the temp WWW: www
chown -R www:www fastcgi_temp/
Read More:
- [PHP] Solve the limitation of uploading files in nginx php 413 Request Entity Too Large
- nginx.conf php-fpm.conf and php.ini Error among the three_ Differences and relations between log instructions
- /www/server/php/56/sbin/php-fpm:error while loading shared libraries:libssl.so.1.0. 0:cannot open shared object file:No such file or directory
- Error during session start; please check your PHP and/or webserver log file and configure your PHP
- [Solved] PHP Error: Warning: file_get_contents(): Failed to enable crypto
- [PHP] Solve the 500 error problem-nginx and fpm have no error logs
- PHP encryption 3DES error Call to undefined function: mcrypt_module_open() solution
- PHP large file upload error 413: request entity too large [How to Solve]
- php_network_getaddresses: getaddrinfo failed (How to Fix)
- [Solved] PHP -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory
- PHP: How to parse MHT file into HTML
- laravel The Process class relies on proc_open, which is not available on your PHP installation.
- [Solved] PHP getimagesize(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL
- php Error: mail() Failed to connect to mailserver at “localhost” port 25
- How to Hide index.php
- [Solved] file_get_contents(): SSL operation failed with code 1
- Mac installs the php Swoole extension and appears Enable openssl support, require openssl library or fatal error:’openssl/ssl.h’ file not found
- [Solved] tp6.0 open_basedir Error: Warning: require(): open_basedir restriction in effect.
- PHP error in Windows: class’ mysqli ‘not found
- [Solved] Laravel Upload Files Verificate Error: The file failed to upload.