This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-23. For the latest, interactive version please visit https://mariadb.com/kb/.

Specifying Permissions for Schema (Data) Directories and Tables

Default File Permissions

By default MariaDB uses the following permissions for files and directories:

Object TypeDefault ModeDefault Permissions
Files0660-rw-rw----
Directories0700drwx------

Configuring File Permissions with Environment Variables

You can configure MariaDB to use different permissions for files and directories by setting the following environment variables before you start the server:

Object TypeEnvironment Variable
FilesUMASK
DirectoriesUMASK_DIR

In other words, if you would run the following in a shell:

export UMASK=0640
export UMASK_DIR=0750

These environment variables do not set the umask. They set the default file system permissions. See MDEV-23058 for more information.

Configuring File Permissions with systemd

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.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.