I have an Apache2 server that cannot access the mod-security log:
prim@x.x.x.x:~$ apachectl -V
AH00526: Syntax error on line 196 of /etc/modsecurity/modsecurity.conf:
ModSecurity: Failed to open the audit log file: /var/log/apache2/modsec_audit.log
Action '-V' failed.
The Apache error log may have more information.
prim@x.x.x.x:~$ sudo ls -la /var/log/apache2/modsec_audit.log
-rw-rwxrwx 1 root www-data 101792 Oct 22 16:37 /var/log/apache2/modsec_audit.log
I am a bit puzzled, because everyone (owner, group, others) have rights to open the log file.
edit:
prim@x.x.x.:/var/log/unattended-upgrades$ sudo -u www-data touch /var/log/apache2/modsec_audit.log
touch: cannot touch '/var/log/apache2/modsec_audit.log': Permission denied
This gets stranger...
edit2:
prim@x.x.x.x:/var/log/unattended-upgrades$ sudo ls -la /var/log/apache2/
total 1015752
drw-r--r-- 2 root adm 12288 Oct 22 15:55 .
edit3:
ls -la /var/log|grep apache
drw-r--r-- 2 root adm 12288 Oct 22 15:55 apache2