How to run from PHP a bash script under root user

前端 未结 5 1477
天涯浪人
天涯浪人 2020-12-09 18:02

How to run from PHP a bash script under root user (with all permissions) and not nobody user - php default user?

thats my output af

5条回答
  •  执笔经年
    2020-12-09 18:36

    You can make a program which is set-uid root. This causes the program to always run as root. This doesn't work with shell scripts, so you have to use a program which calls your script.

提交回复
热议问题