How can I have a PHP script run a shell script as root?

前端 未结 7 1275
野的像风
野的像风 2021-01-15 03:54

Running Fedora 9/10, Apache 2, PHP 5...

Can I run a shell script as root, from a PHP script using exec()?

Do I just give Apache root priveleges, and then add

7条回答
  •  醉酒成梦
    2021-01-15 04:18

    I'm not professional in this field, but it looks like you need SUID flag.

    Read here for examples or google

提交回复
热议问题