STIGhubSTIGhub
STIGhub— A free STIG search and compliance tool·STIGs updated 1 hour ago
Powered by Pylon·Privacy·Terms·Feedback·© 2026 Beacon Cloud Solutions, Inc.
← Back to Oracle MySQL 9.x Security Technical Implementation Guide

V-289304

CAT II (Medium)

Access to database files must be limited to relevant processes and to authorized, administrative users.

Rule ID

SV-289304r1319075_rule

STIG

Oracle MySQL 9.x Security Technical Implementation Guide

Version

V1R1

CCIs

CCI-001090

Discussion

Applications, including database management systems (DBMSs), must prevent unauthorized and unintended information transfer via shared system resources. Permitting only DBMS processes and authorized, administrative users to have access to the files where the database resides helps ensure that those files are not shared inappropriately and are not open to backdoor access and manipulation. As a general rule, distributed files and resources should follow the principle of least privilege, which requires that users, processes, programs, and other system components only have access to information and resources required for their legitimate purpose.

Check Content

Review the system documentation and identify the operating system locations used by MySQL for database files, logs, audit logs, keys, and backup files.

Review the permissions and ownership of these directories and files using operating system commands such as:
ls -ld <directory>
ls -l <directory>

or:
stat <file-or-directory>

Verify that access is limited to the MySQL service account, authorized system administrators, authorized database administrators, and any specifically authorized backup or monitoring service accounts with a documented need for access.

For MySQL-managed files and directories on Linux/Unix systems, verify the following or more restrictive permissions, as applicable:
- MySQL data directories: Owned by mysql:mysql, permissions "0750" or more restrictive.
- MySQL database and log files: Owned by mysql:mysql, permissions "0640" or more restrictive.
- secure_file_priv/mysql-files directory: Owned by mysql:mysql, permissions "0750" or more restrictive.
- Private key files: Accessible only to the MySQL service account and authorized administrators; MySQL-generated private keys use permissions "0600".
- Audit log directories must be accessible only to the MySQL server and users with a legitimate requirement to view the audit logs.

If a MySQL database file, log file, audit file, key file, or backup file is accessible by an unauthorized operating system user or group, this is a finding.

If a MySQL-managed directory or file has permissions more permissive than required for its documented function without an approved justification, this is a finding.

Fix Text

Configure operating system ownership and permissions so that MySQL database files and related resources are accessible only to the MySQL service account and authorized administrative or service accounts with a documented need for access.

For a standard Linux/Unix MySQL installation, set MySQL-managed data directories to ownership "mysql:mysql" and permissions to "0750" or more restrictive:
chown mysql:mysql <mysql_directory>
chmod 750 <mysql_directory>

Set MySQL-managed database and log files to ownership "mysql:mysql" and permissions to "0640" or more restrictive:
chown mysql:mysql <mysql_file>
chmod 640 <mysql_file>

For MySQL private key files, restrict access to the MySQL service account:
chown mysql:mysql <private_key_file>
chmod 600 <private_key_file>

Where backup, audit, or other files are owned by a separate authorized service account, configure ownership according to the documented service account and restrict permissions to that account, MySQL where required, and authorized administrators.

Remove permissions granted to unauthorized users or groups.