I’m trying to run a PHP Script that parses my Ubuntu Apache Logs for RSS Subscribers (https://gist.github.com/marcoarment/5968198) by executing:
php -f feed-subscribers.php < /var/log/apache2/access.log
The problem is that even if I run it as sudo, I get an access denied error. I’ve been able to execute bash and python scripts with sudo that worked fine accessing the apache logs.
Can anyone give some guidance on how to adjust my set up to work properly?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.