Bug #78808 Manual is wrong when explaining the default UMASK value
Submitted: 12 Oct 2015 16:57 Modified: 11 Dec 2015 18:41
Reporter: Valeriy Kravchuk Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: umask

[12 Oct 2015 16:57] Valeriy Kravchuk
Description:
Manual (https://dev.mysql.com/doc/refman/5.7/en/file-permissions.html) says:

"The default UMASK value is 0660."

This was true in 5.6, see mysys/my_init.c:

 74   my_umask= 0660;                       /* Default umask for new files */
 75   my_umask_dir= 0700;                   /* Default umask for new directories     */

But this is no longer true in 5.7, see the same file and the same my_init() function:

100   my_umask= 0640;                       /* Default umask for new files */
101   my_umask_dir= 0750;                   /* Default umask for new directories     */

So, manual for 5.7 became misleading/wrong

How to repeat:
Try to set non-default access permissions (like 0770) for database directories in 5.7 using UMASK_DIR environment variable, fail to see the effect, enjoy reading the manual in a hope to get explanations.

Suggested fix:
Fix the manual according to the change in the source code of 5.7, describe this as an incompatible change in default behavior, explain in details how to get non-default permissions for the database directories in 5.7.
[12 Oct 2015 20:26] MySQL Verification Team
Thank you for the bug report.
[11 Dec 2015 18:41] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly.

I've updated the 5.7 manual with the correct default UMASK/UMASK_DIR values (0640 and 0750 as of 5.7.6).

I did not have problems changing the default permissions as described in the manual, *except* that, in attempting to follow the instructions at
http://dev.mysql.com/doc/refman/5.7/en/file-permissions.html
I found that I had to specify the values in octal. See:
Bug #79608	mysqld_safe mishandles UMASK

Since directory permissions are set as a combination of UMASK_DIR and UMASK, having mysqld_safe mishandle UMASK causes problems changing the default directory permissions. Perhaps you encountered a similar problem.