Hello there,
I've encountered an issue where some log files are being created with permissions set to 666, while others are set to 640. I'm unable to discern the reason behind this discrepancy. From what I understand of the implementation, the log files are created solely by opening a basic_ofstream<tchar> stream, which should utilize the system's default file permissions. In my particular case, the umask is set to 0022, which should result in regular files having permissions set to 644.
I haven't encountered any other sections of code that explicitly set the permissions. To the best of my knowledge, all relevant operations occur within the FileAppenderBase::open(std::ios_base::openmode mode) method, where the out.open(path, mode) method is called. The mode is set to 0x01 (representing std::ios::app) - I'm using the Rolling File Appender, and later in the code, it is extended with std::ios::out. However, these settings remain consistent for all log files and should not directly impact the file permissions.
Does anyone have an idea why this is happening? Is it possibly a bug, or is there something else I might be overlooking?
Thank you in advance!
Version: 2.0.5
Hello there,
I've encountered an issue where some log files are being created with permissions set to
666, while others are set to640. I'm unable to discern the reason behind this discrepancy. From what I understand of the implementation, the log files are created solely by opening abasic_ofstream<tchar>stream, which should utilize the system's default file permissions. In my particular case, theumaskis set to0022, which should result in regular files having permissions set to644.I haven't encountered any other sections of code that explicitly set the permissions. To the best of my knowledge, all relevant operations occur within the
FileAppenderBase::open(std::ios_base::openmode mode)method, where theout.open(path, mode)method is called. The mode is set to 0x01 (representingstd::ios::app) - I'm using the Rolling File Appender, and later in the code, it is extended withstd::ios::out. However, these settings remain consistent for all log files and should not directly impact the file permissions.Does anyone have an idea why this is happening? Is it possibly a bug, or is there something else I might be overlooking?
Thank you in advance!
Version: 2.0.5