By default MariaDB uses the following permissions for files and directories:
Object Type | Default Mode | Default Permissions |
---|---|---|
Files | 0660 |
-rw-rw---- |
Directories | 0700 |
drwx------ |
You can configure MariaDB to use different permissions for files and directories by setting the following environment variables before you start the server:
Object Type | Environment Variable |
---|---|
Files | UMASK |
Directories | UMASK_DIR |
In other words, if you would run the following in a shell:
export UMASK=0027 export UMASK_DIR=0027
Then any mysqld
processes started by that shell will use 0027
as both UMASK
and UMASK_DIR
, which will result in a 0640
mode for files and a 0750
mode for directories.
If your server is started by systemd
, then there is a specific way to configure the umask. See Systemd: Configuring the umask for more information.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/specifying-permissions-for-schema-data-directories-and-tables/