STIGQter STIGQter: STIG Summary: MariaDB Enterprise 10.x Security Technical Implementation Guide Version: 2 Release: 5 Benchmark Date: 01 Apr 2026:

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

DISA Rule

SV-253713r1137658_rule

Vulnerability Number

V-253713

Group Title

SRG-APP-000243-DB-000374

Rule Version

MADB-10-005600

Severity

CAT II

CCI(s)

Weight

10

Fix Recommendation

By default all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql.

To find the location of the datadir run this command:

Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir';

Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name that file will still be in the datadir directory.

error_log
innodb_log_group_home_dir
innodb_temp_data_file_path
innodb_tmpdir
innodb_undo_directory
innodb_temp_data_file_path
innodb_tmpdir
log_bin_basename
log_error
relay_log_basename
relay_log_file_info
sql_error_log_filename
tmpdir

Configure the permissions granted by the operating system/file system on the database files, database log files, and database backup files so that only relevant system accounts and authorized system administrators and database administrators with a need to know are permitted to read/view these files.

Any files (e.g., extra configuration files) created in datadir, or a nondefault directory defined by a variable above, must be owned by the database administrator, with only owner permissions to read, write, and execute.

Check Contents

By default, all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql.

To find the location of the datadir run this command:

Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir';

Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name, that file will still be in the default directory.

error_log
innodb_log_group_home_dir
innodb_temp_data_file_path
innodb_tmpdir
innodb_undo_directory
innodb_temp_data_file_path
innodb_tmpdir
log_bin_basename
log_error
relay_log_basename
relay_log_file_info
sql_error_log_filename
tmpdir

Review the permissions granted to users by the operating system/file system on the database files, database log files, and database backup files.

To verify that all files are owned by the database administrator and have the correct permissions, run the following as the database administrator:

$ sudo su - root
$ ls -lR {datadir}
$ ls -lR other directories defined by variables above

If using mysqldump or another tool for backups, also run the "ls" command as above on the directory that will be containing the backup file.

If any files are not owned by the database administrator or allow anyone but the database administrator to read/write/execute, this is a finding.

If any user/role who is not an authorized system administrator with a need-to-know, database administrator with a need-to-know, or system account for running MariaDB processes is permitted to read/view any of these files, this is a finding.

Vulnerability Number

V-253713

Documentable

False

Rule Version

MADB-10-005600

Severity Override Guidance

By default, all of the MariaDB database files, log files, and backup files are located in the /var/lib/mysql.

To find the location of the datadir run this command:

Mariadb > SHOW GLOBAL VARIABLES LIKE 'datadir';

Check the /etc/my.cnf file for the following variables to determine if any of these files have a nondefault location configured. Only variables that specify a directory different from datadir will be in a different directory. If the variable only specifies a file name, that file will still be in the default directory.

error_log
innodb_log_group_home_dir
innodb_temp_data_file_path
innodb_tmpdir
innodb_undo_directory
innodb_temp_data_file_path
innodb_tmpdir
log_bin_basename
log_error
relay_log_basename
relay_log_file_info
sql_error_log_filename
tmpdir

Review the permissions granted to users by the operating system/file system on the database files, database log files, and database backup files.

To verify that all files are owned by the database administrator and have the correct permissions, run the following as the database administrator:

$ sudo su - root
$ ls -lR {datadir}
$ ls -lR other directories defined by variables above

If using mysqldump or another tool for backups, also run the "ls" command as above on the directory that will be containing the backup file.

If any files are not owned by the database administrator or allow anyone but the database administrator to read/write/execute, this is a finding.

If any user/role who is not an authorized system administrator with a need-to-know, database administrator with a need-to-know, or system account for running MariaDB processes is permitted to read/view any of these files, this is a finding.

Check Content Reference

M

Target Key

5475