Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30520

SELinux incorrectly labeled mariadbd

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Done
    • 10.6.11
    • N/A
    • Packaging
    • None
    • Rocky9

    Description

      It looks like the rpm packaged version will have an SELinux problem on systems running RHEL-9 or one of it clones.
      Using the MariaDB direct from the OS will work. Also the none LTS version from maria.org.

      SElinux error:

      type=AVC msg=audit(1675146674.414:430): avc:  denied  { connectto } for  pid=4435 comm="php-fpm" path="/var/lib/mysql/mysql.sock" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:unconfined_service_t:s0 tclass=unix_stream_socket permissive=0
      type=SYSCALL msg=audit(1675146674.414:430): arch=c000003e syscall=42 success=no exit=-13 a0=9 a1=7ffddc679b90 a2=1b a3=5582de7da5b0 items=0 ppid=2851 pid=4435 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm="php-fpm" exe="/opt/remi/php82/root/usr/sbin/php-fpm" subj=system_u:system_r:httpd_t:s0 key=(null)ARCH=x86_64 SYSCALL=connect AUID="unset" UID="apache" GID="apache" EUID="apache" SUID="apache" FSUID="apache" EGID="apache" SGID="apache" FSGID="apache"
      type=PROCTITLE msg=audit(1675146674.414:430): proctitle=7068702D66706D3A20706F6F6C2077696B6974657374312E6D64632D6265726C696E2E6E6574
      

      I have found some hints for the problem:
      https://unix.stackexchange.com/questions/718879/selinux-php-fpm-httpd-and-mariadb-socket-connection
      https://almalinux.discourse.group/t/selinux-php-fpm-httpd-and-mariadb-socket-connection/1626

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              mariaTux Frank
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.