I wrote a PHP script to start processes on some servers. the apache server runs as an http server and tries to run as a root server to prohibit re-compilation. So I thought of another method: if you copy a program and change the owner to http and grant the 755 permission to the program, you still encounter an error saying no... I wrote a PHP script to start processes on some servers. the apache server runs as an http server and tries to run as a root server to prohibit re-compilation. So I thought of another method: if I copy a program and change the owner to http and grant 755 permissions to the program, I still encounter an error saying that I have no permissions. What is the problem?
Reply content:
I wrote a PHP script to start processes on some servers. the apache server runs as an http server and tries to run as a root server to prohibit re-compilation. So I thought of another method: if I copy a program and change the owner to http and grant 755 permissions to the program, I still encounter an error saying that I have no permissions. What is the problem?
I don't understand what you want to do.
Unless special permissions such as set-user-id or set-group-id are used, the permissions of a process are only related to the users who execute the process, the permission is not related to the binary file used by the process.
It seems that httpd cannot be executed with the root permission for security reasons. This is a wise decision. If the PHP program loaded using the httpd module needs to call other processes by another side, consider using sudo.
The configuration file of apache contains the configurations of running users.