Description
With Apache2 MPM ITK, every virtual host can run under a separate uid and gid. Using Apache2 MPM ITK with ModSecurity results in some error entries in the audit log because of missing permissions.
The Problem is, that the DBM file can't be accessed/written, because the default permissions to the files are 0640. This results in the situation, that only one virtual host is able to initially write the DBM files (if they do not exist). All other virtual hosts are not able to read/write to the DB; files resulting in the following messages in the audit log
Message: collections_remove_stale: Failed to access DBM file "/tmp//global": Permission denied Message: collections_remove_stale: Failed to access DBM file "/tmp//ip": Permission denied
When you set the DBM file world writeable, then the above errors are not logged any more and each virtual host can access the DBM file.
The audit log still shows the following error, which I was not able to reproduce/fix
Message: Audit log: Failed to lock global mutex: Permission denied
It seems there is a general problem when running virtual hosts as different users with mod MPM ITK or mod RUID, as the global mutex problem is already filed here #454
It would be great if you could define SecDataDir also in the VHOST scope or if file permissions to all DBM files could be set in the configuration file. Also it would be great if the global mutex problem could be resolved.
If I can help debugging the global mutex problem, don't hesitate to contact me.