1Z0-908 practice question 23 of 25

On examination, your MySQL installation datadir has become recursively world read/write/executable. What are two major concerns of running an installation with incorrect file privileges? (Choose two.)

Full set: 140 questions
Answer options
A: Users could overwrite configuration files. Correct answer
B: Data files could be deleted. Correct answer
C: SQL injections could be used to insert bad data into the database.
D: MySQL binaries could be damaged, deleted, or altered.
E: Extra startup time would be required for the MySQL server to reset the privileges.
Correct Answer:
A. Users could overwrite configuration files.; B. Data files could be deleted.
Explanation

A world-readable/writable/executable datadir is a critical security vulnerability. It grants any user on the server's operating system full control over the core database files. This allows for two major types of attacks. First, a malicious or careless user could delete essential data files (e.g., .ibd files), leading to catastrophic and immediate data loss. Second, users could modify or overwrite configuration files stored within the datadir, such as auto.cnf (which stores the server UUID critical for replication) or other table definition files. This could lead to server instability, data corruption, or a denial of service.

Why Incorrect

C. SQL injection is an application-layer vulnerability that exploits improper handling of user input in SQL queries; it is unrelated to filesystem permissions.
D. MySQL binaries (e.g., mysqld) are located in the installation's bin directory, not the datadir, so they would not be affected by these permissions.
E. The MySQL server does not automatically reset filesystem privileges. It would likely fail to start due to insecure permissions, not just experience a delay.

References

1. MySQL 8.0 Reference Manual, Section 6.1.5, "Security Guidelines": This section explicitly advises restricting filesystem access. It states, "The operating system account that the MySQL server runs as should be the only account with read/write permission in the MySQL data directory and log directories." This underscores the danger of world-writable permissions, which directly enable the risks described in options A and B.

2. MySQL 8.0 Reference Manual, Section 2.9.2, "The MySQL Data Directory": This section details the contents of the data directory, confirming it contains subdirectories for databases, data files for tables, log files, and status files like auto.cnf. This confirms that both data files (Option B) and configuration-related files (Option A) reside in the datadir and would be exposed by incorrect permissions.

Scroll to Top