Re: [請益] 要怎麼用php程式切換成root權限?
※ 引述《punpun (小金 )》之銘言:
: ※ 引述《JoeHorn (每個人心中都有一段被刪)》之銘言:
: : 你需要的是 suPHP .
: : http://www.suphp.org/
: : suPHP is a tool for executing PHP scripts with the permissions of their
: : owners. It consists of an Apache module (mod_suphp) and a setuid root binary
: : (suphp) that is called by the Apache module to change the uid of the process
: : executing the PHP interpreter.
: 有使用過suphp的大大可不可以分享依下心得壓~~~
: 怎麼測試安裝有沒有成功呢^^?
寫個 php 程式, 把檔案擁有者用 chmod 切換成 root .
php 程式裡面會去開檔或寫檔, 而開寫檔的目錄只有 root 才能動.
: 一直找不到相關的語法說明文件~~~~
語法跟 php 一樣!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 221.169.82.134
討論串 (同標題文章)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章