我的linux系统上有一个用户brftv,我有运行nginx的www-data。从终端我可以让我的brftv用户运行sudo/sbin/reboot它工作正常,因为我将以下内容添加到我的/etc/sudoers文件的“#userprivilegespecification”部分:brftvALL=NOPASSWD:/sbin/halt,/sbin/reboot,/sbin/poweroffwww-dataALL=NOPASSWD:/sbin/halt,/sbin/reboot,/sbin/poweroff但是当我的php文件运行下面的代码时,没有任何反应exec('nohupsudo-
我的linux系统上有一个用户brftv,我有运行nginx的www-data。从终端我可以让我的brftv用户运行sudo/sbin/reboot它工作正常,因为我将以下内容添加到我的/etc/sudoers文件的“#userprivilegespecification”部分:brftvALL=NOPASSWD:/sbin/halt,/sbin/reboot,/sbin/poweroffwww-dataALL=NOPASSWD:/sbin/halt,/sbin/reboot,/sbin/poweroff但是当我的php文件运行下面的代码时,没有任何反应exec('nohupsudo-