Specifying Permissions for Schema (Data) Directories and Tables

You are viewing an old version of this article. View the current version here.

Default Privileges

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

Object TypeDefault ModeDefault Privileges
Files0660-rw-rw----
Directories0700drwx------

Configuring File Privileges with Environment Variables

You can configure MariaDB to use different privileges 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=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.

Configuring File Privileges 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.

Comments

Comments loading...
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.