Non-Default Environment Variables UMASK And UMASK_DIR Have No Effect in MySQL 5.7

(Doc ID 2316230.1)

Last updated on OCTOBER 16, 2017

Applies to:

MySQL Server - Version 5.7 to 5.7 [Release 5.7]
Information in this document applies to any platform.

Symptoms

Using non-default access permissions (like 0700) for database directories and (like 0600) for table files in MySQL 5.7 using UMASK_DIR and UMASK environment variables (see MySQL Program Environment Variables), does not have any effect whereas it works in MySQL 5.6.

Here is an example in MySQL 5.7:

So the newly created table files (i.e. t_test.frm and t_test.ibd) don't have a mode 0600 (all values octal) as expected, but the newly created database directory (i.e. /var/lib/mysql/mytst) does not have the mode 0700 (all values octal) as expected.

Changes

The issue can start after upgrading to MySQL Server 5.7.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms