By default MariaDB uses the following modes for creating directories and files.
|Mode for||Default Mode||Environment variable|
|Files||0660 (same as -rw-rw----)||UMASK|
|Directories||0700 (same as drwx------)||UMASK_DIR|
Note that the environment variables are modes specified in octal and OR:de with the default value (as the default value is the minimum value needed for mysqld to work).
In other words, if you would run the following in the shell:
set UMASK=001 export UMASK
mysqld would use the mode
0661 when creating new files.