Bug #96896 | mysqld_safe doen't respect UMASK when creating MySQL Error Log. | ||
---|---|---|---|
Submitted: | 17 Sep 2019 6:20 | Modified: | 2 Oct 2019 15:33 |
Reporter: | Meiji Kimura | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.6.45 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[17 Sep 2019 6:20]
Meiji Kimura
[17 Sep 2019 7:13]
MySQL Verification Team
Hello Meiji-San, Thank you for the report and steps. Verified as described with 5.6.45 build. regards, Umesh
[17 Sep 2019 8:15]
Terje Røsten
Due to various problems in mysqld_safe and stronger focus on robustness and the fact that this script might be run by privileged user, default umask is hard coded and set to strict value 0137. This will not change. The workaround is simple: create the file with wanted properties *before* mysqld_safe is executed. A documentation update is required.
[17 Sep 2019 8:17]
MySQL Verification Team
Thank you, Terje. regards, Umesh
[2 Oct 2019 15:33]
Paul DuBois
Posted by developer: Added a note to https://dev.mysql.com/doc/refman/8.0/en/file-permissions.html: An exception applies for the error log file if you start mysqld using mysqld_safe, which does not respect UMASK: mysqld_safe may create the error log file if it does not exist prior to starting mysqld, and mysqld_safe uses a umask set to a strict value of 0137. If this is unsuitable, create the error file manually with the desired access mode prior to executing mysqld_safe. And added a cross reference for that section to https://dev.mysql.com/doc/refman/8.0/en/environment-variables.html.