Linux authorized users run specific commands

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.