Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make log file permissions configurable #219

Open
atoom opened this issue Jan 31, 2019 · 2 comments
Open

Make log file permissions configurable #219

atoom opened this issue Jan 31, 2019 · 2 comments

Comments

@atoom
Copy link

atoom commented Jan 31, 2019

Hi,

Currently the default logging mechanism has a hardcoded file permissions set to 0600 for the log output file. Would it be possible to make this value configurable, alternatively let the OS set the file permissions based on the process umask ?

The reason for this feature request is that we want group read access to log file to allow for non-root users and other processes to view the log file.

We already have a separate logging plugin to provide "access log" functionality and we could theoretically do something similar to solve this issue but we would prefeer to run the default logger for edgemicro system logging.

For reference see microgateway-core/lib/logging.js:

logFileFd = fs.openSync(logFilePath, 'a', 0o0600);

@anuj7kaushik
Copy link

We also need this feature

@imesh
Copy link
Contributor

imesh commented Jun 30, 2021

Thanks @atoom for reporting this feature request. I also tend to agree that operating system users other than the Microgateway user may need to access Microgateway log files for debugging and monitoring purposes.

I could see that a similar improvement has been done in PostgreSQL by introducing log_file_mode parameter sometime back:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants