I am writing web pages using PHP and would like to "require" code that I have written (in the future I would also like to be able to run python code).
whoami gives: www-data
require '/fullpath/code.php';
The error I get is:
require(/fullpath/code.php): failed to open stream: Permission denied
So the user www-data doesn't have permission to run my code. How do I give it permission? Also, how do I do this without opening up the can of worms giving hackers access to my web programs?
I have sudo privileges but I've never heard of the user www-data
I do sudo find . | grep www-data
(from the "/" directory) and I get nothing.
So I'm not even sure where to find this "user" to change its permissions.
Thanks