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

前端 未结 4 785
时光取名叫无心
时光取名叫无心 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:58

    This is probably down to something like trying to execute sudo in a non-interactive shell.

    If you do a grep for 'sudo' in your apache users mail log you might find things like this

    sudo: sorry, you must have a tty to run sudo

提交回复
热议问题