TMAegis
More rules for tdsql

TMA-TDSQL-5.6

Ensure No Excessive `FILE` Privilege Grants

HighLevel 1Manual reviewtdsql

Description

The FILE privilege allows users to read and write server filesystem files via LOAD DATA INFILE, SELECT ... INTO OUTFILE, LOAD_FILE(), and similar.

How it is checked

Audit method: Manual review

This recommendation cannot be checked automatically. A scan lists it with these instructions when you pass --include-manual.

SELECT User, Host FROM mysql.user WHERE File_priv = 'Y'; Confirm only accounts that genuinely require it hold this privilege.

How it is fixed

Fix method: Guidance or infrastructure patch

REVOKE FILE ON *.* FROM 'username'@'host';

Properties

Operating systems
Any
Tags
tdsqlprivileges
Reference
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 5.6 Ensure No Excessive `FILE` Privilege Grants