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

Add permission error when user cannot write to /etc/nginx folder #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

poespas
Copy link

@poespas poespas commented Dec 30, 2024

Currently users get a very vague message when they run the nginx_config_reloader on an user that isn't able to write to /etc/nginx, this PR should solve this and add the check.

Before:

2024-12-30 06:25:19,553 nginx_config_reloader INFO     /data/web/nginx
2024-12-30 06:25:19,553 nginx_config_reloader DEBUG    Applying new config
2024-12-30 06:25:19,647 nginx_config_reloader ERROR    Installation of magento config failed

After:

2024-12-30 06:22:14,216 nginx_config_reloader INFO     /data/web/nginx
2024-12-30 06:22:14,216 nginx_config_reloader DEBUG    Applying new config
2024-12-30 06:22:14,229 nginx_config_reloader ERROR    No write permissions to main nginx config directory, please check your permissions.

Copy link
Contributor

@tdgroot tdgroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, can you add a test to reflect the changes in _apply?

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

Successfully merging this pull request may close these issues.

2 participants