PHP webpage doesn't launch unix command even after updated sudoers

前端 未结 4 781
时光取名叫无心
时光取名叫无心 2020-12-11 11:29

Basically I am trying to restart a service from a php web page.

Here is the code:



        
4条回答
  •  Happy的楠姐
    2020-12-11 11:35

    The problem is not with sudo at the moment, but with SELinux, which is (reasonably) set to deny the HTTPD from gaining root privileges.
    You will need to either explicitly allow this (you can use audit2allow for this), or set SELinux to be permissive instead. I'd suggest the former.

提交回复
热议问题