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

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

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

Here is the code:



        
4条回答
  •  情深已故
    2020-12-11 11:53

    The error you are getting seems to be related to your SELinux configuration. You might try temporarily disabling that.

    As an aside, I would strongly suggest that you adjust your sudo configuration to be more restrictive.

    User_Alias WWW=apache
    Cmnd_Alias WEBCMDS=/etc/init.d/portmap
    WWW ALL=NOPASSWD: WEBCMDS
    

提交回复
热议问题