sudo in php exec()

后端 未结 7 1172
执笔经年
执笔经年 2020-11-22 09:44

I don\'t know what the deal is here…

So I want to run an applescript: sudo osascript myscript.scpt

This works fine in the terminal, but not when

相关标签:
7条回答
  • 2020-11-22 10:47

    It sounds like you need to set up passwordless sudo. Try:

    %admin ALL=(ALL) NOPASSWD: osascript myscript.scpt
    

    Also comment out the following line (in /etc/sudoers via visudo), if it is there:

    Defaults    requiretty
    
    0 讨论(0)
提交回复
热议问题