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
精彩评论