How to run from PHP a bash script under root user

前端 未结 5 1483
天涯浪人
天涯浪人 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:28

    Under Linux you normally do this using sudo. Try to be as specific as possible, so not to give the script too many permissions.

    For examples on how to use sudo: http://aplawrence.com/Basics/sudo.html

提交回复
热议问题