1. Home
  2. Security Hardening
  3. CIS MySQL 8.0 Enterprise Linux OS L1 V1.1.0
  4. Ensure ‘log_error’ Has Appropriate Permissions – log_error Has Appropriate Permissions and Ownership

Ensure ‘log_error’ Has Appropriate Permissions – log_error Has Appropriate Permissions and Ownership

Details

MySQL can operate using a variety of log files, each used for different purposes. These are the binary log (which can be encrypted), error log, slow query log, relay log, general log, and in the enterprise edition, the audit log (which can be encrypted). Because these are files on the host operating system, they are subject to the permissions and ownership structure provided by the host and may be accessible by users other than the MySQL user. Additionally, using secure key management and at rest MySQL encryption can further protect data from OS users.

Much of the information about the state of MySQL exists in MySQL, the MySQL performance_schema or informations_schema. In cases where the information you need is within a running MySQL, use these methods as they are more secure as do not require OS login and access.

Rationale:

Limiting the accessibility of these objects will protect the confidentiality, integrity, and availability of the MySQL logs.

Impact:

Changing the permissions of the error log files might have impact on monitoring tools which use an error log file adapter.

Solution

Execute the following command for each log file location requiring corrected permissions and ownership:

chmod 600
chown mysql:mysql

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: System and Communications Protection.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles