Este contenido no está disponible en el idioma seleccionado.

20.2. Types


The main permission control method used in SELinux targeted policy to provide advanced process isolation is Type Enforcement. All files and processes are labeled with a type: types define a SELinux domain for processes and a SELinux type for files. SELinux policy rules define how types access each other, whether it be a domain accessing a type, or a domain accessing another domain. Access is only allowed if a specific SELinux policy rule exists that allows it.
The following types are used with mysqld. Different types allow you to configure flexible access:
mysqld_db_t
This type is used for the location of the MariaDB database. In Red Hat Enterprise Linux, the default location for the database is the /var/lib/mysql/ directory, however this can be changed. If the location for the MariaDB database is changed, the new location must be labeled with this type. See the example in Section 20.4.1, “MariaDB Changing Database Location” for instructions on how to change the default database location and how to label the new section appropriately.
mysqld_etc_t
This type is used for the MariaDB main configuration file /etc/my.cnf and any other configuration files in the /etc/mysql/ directory.
mysqld_exec_t
This type is used for the mysqld binary located at /usr/libexec/mysqld, which is the default location for the MariaDB binary on Red Hat Enterprise Linux. Other systems may locate this binary at /usr/sbin/mysqld which should also be labeled with this type.
mysqld_unit_file_t
This type is used for executable MariaDB-related files located in the /usr/lib/systemd/system/ directory by default in Red Hat Enterprise Linux.
mysqld_log_t
Logs for MariaDB need to be labeled with this type for proper operation. All log files in the /var/log/ directory matching the mysql.* wildcard must be labeled with this type.
mysqld_var_run_t
This type is used by files in the /var/run/mariadb/ directory, specifically the process id (PID) named /var/run/mariadb/mariadb.pid, which is created by the mysqld daemon when it runs. This type is also used for related socket files such as /var/lib/mysql/mysql.sock. Files such as these must be labeled correctly for proper operation as a confined service.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat