Thanks for your reply!I have checked the MariaDB Jira and found several issues related to UMASK and directory permissions, but none of them address the specific problem of the UNIX socket file (/run/mysqld/mysqld.sock) always being created with mode 0777, regardless of systemd unit UMask or shell umask. All related issues focus on data directory/file creation, not on socket permissions.
I have just created a new bug report in Jira: https://jira.mariadb.org/browse/MDEV-3786

