I'm trying to read the apache2 custom log files in the /var/log/apache2/my_site/access.log in a Java program. But i get a permission denied Excpetion.
The code is working on the Winows OS, i can read the log file, but in Ubuntu, i cannot access the apache2 log files in the JVM. This is the output
The permissions snapshot
So how can i adjust the file permissions that i can read the file and Apache 2 still can write to it?
Fixed by changing the folder of the log file outside the /var/log/apache2 folder. Apache2 and JVM can both access the file in RW mode.