开发者

PHP-CLI Permission Question

Dear Stackoverflow'er:

I am currently trying to run my script over PHP-CLI. I want to create a file over: fopen($filename, "w+")

If I run this over this over the webbrowser, the script will be able to create the file, since the folder is owned by 'www-data'.

But if I try to run it over CLI it doesn't work, since PHP has not the same user, so I added www-data into /etc/sudoers with NOPASSWD. I tried then to run: sudo -u www-data php ./content.php

But it still doesn't work, do you have maybe a suggestion?

Best, djcr开发者_C百科ackhome

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜