My apache server puts the logfile for my project under
/var/log/apache2/foo_error.log
I set the user and group to the ones of my project (foo:www-data) and I even tried to chmod to 777 (i know that it is a risk, but it is just a local VM), but if I try to access it, then I still get Permission Denied
tail -f /var/log/apache2/foo_error.log
tail: cannot open '/var/log/apache2/foo_error.log' for reading: Permission denied
tail: no files remaining
The only solution I figured out, was to change the VHOST configuration so that the logfile is getting saved in the folder of the project. But I ask this question out of interest if it also work if the logfile is in the apache2 log folder.