My Oracle Support Banner

Non-Default Environment Variables UMASK And UMASK_DIR Have No Effect in MySQL 5.7 (Doc ID 2316230.1)

Last updated on FEBRUARY 15, 2019

Applies to:

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


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.


The issue can start after upgrading to MySQL Server 5.7.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.