[SERVER-36977] Initial mongod.log is created using umask vs mode 600 Created: 04/Sep/18  Updated: 29/Oct/23  Resolved: 26/Oct/18

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 3.6.6, 4.0.2
Fix Version/s: 3.6.10, 4.0.5, 4.1.5

Type: Bug Priority: Major - P3
Reporter: Arnie Listhaus Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
duplicates SERVER-11887 Default file permissions on mongod an... Closed
Related
is related to SERVER-37151 Allow logs to be created with differe... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Security 2018-10-22, Security 2018-11-05
Participants:
Case:

 Description   

When mongod starts it creates the mongod.log. This initial file will be created based on the umask of the process.

However, log rotation will default to mode 600 unless honorSystemUmask is set. This behavior seems inconsistent.

This behavior appears to have been introduced with SERVER-22829.



 Comments   
Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-36977 fix lint
Branch: v3.6
https://github.com/mongodb/mongo/commit/1530b1f1087d81e4b3a63dbaeb03d57a58e50574

Comment by Githook User [ 30/Nov/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-36977 Set process umask before creating log file

(cherry picked from commit a15cf62de1d5de973160ec1a23609aaf6f0f500f)
Branch: v3.6
https://github.com/mongodb/mongo/commit/e2aff9fe8ac530d215917d35efcc179b9b6996e2

Comment by Githook User [ 14/Nov/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-36977 Set process umask before creating log file

(cherry picked from commit a15cf62de1d5de973160ec1a23609aaf6f0f500f)
Branch: v4.0
https://github.com/mongodb/mongo/commit/c442c6bf294462e67e7de775ac58ac9516ba679a

Comment by Githook User [ 26/Oct/18 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-36977 Set process umask before creating log file
Branch: master
https://github.com/mongodb/mongo/commit/a15cf62de1d5de973160ec1a23609aaf6f0f500f

Generated at Thu Feb 08 04:44:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.