The file generated by running commands in centosphpcli mode is root user permission, which will cause the webpage to be unable to read the file and save the file. Have you ever encountered this problem, how does phpcli have the permission to execute commands?
The file generated by running commands in centos php cli mode is the root user permission, which will cause the webpage to be unable to read the file and save the file. Have you ever encountered this problem, php cli command execution permission issues
Reply content:
The file generated by running commands in centos php cli mode is the root user permission, which will cause the webpage to be unable to read the file and save the file. Have you ever encountered this problem, php cli command execution permission issues
You should not have used root to run a script for business processing. you can use the same user as nginx/php-fpm/apache httpd, or users in the same user group can run files.
For some reason (to be honest, the root operation is required because it cannot be found), you must use root.Sudo-u [user name]Temporarily switch the user to run the task, or use chown to modify the chgrp, chmod, and so on after the file is generated)
Finally, if you run the program through crontab, you can also specify the user's