Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.6.18
-
VM, Red Hat 8.10
Description
Running mysqladmin from logrotate, which is in the logrotate_t: no matter whether the file is in mysqld_var_run_t or mysqld_db_t, by default it won't work.
logrotate script:
/data/bases/log/mariadb.log
/data/bases/log/slow-queries.log
In the context of logrotate, the access to the MariaDB socket is denied:
type=AVC msg=audit(1719876242.096:38931154): avc: denied
{ write }for pid=2007545 comm="mysqladmin" name="mysql.sock" dev="dm-6" ino=139 scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mysqld_db_t:s0 tclass=sock_file permissive=0
ls -lZ /var/lib/mysql/mysql.sock
srwxrwxrwx. 1 mysql mysql system_u:object_r:mysqld_db_t:s0 0 Jul 2 18:19 /data/bases/mysql.sock