Repository navigation
Conversation
…rkers (oblien#1724) Signed-off-by: Yash Kaushik <yash005kaushik@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1724 and #1604.
Problem
When running OpenResty/Nginx worker processes under an unprivileged user (such as
nobodyorwww-data),openresty -toropenresty -s reloadfails with:nginx: [emerg] open() "/etc/nginx/sites-enabled/<domain>.conf" failed (13: Permission denied)because
NginxProviderpreviously wrote all route files (including.confvhosts) with mode0600(ROUTE_FILE_MODE). Unprivileged workers cannot read0600root-owned files or bind mounts.Changes
VHOST_FILE_MODE = 0o644) from private route state files (ROUTE_STATE_FILE_MODE = 0o600).routeConfigFileMode(path)assigns0o644to.conffiles and0o600to.route.jsonsidecars (preserving credential privacy for verifiers, salts, and session keys).NginxProvider.updateConfigto write with the expected mode and verify mode inisPendingChange.deleteRouterollback to restore.confwith0o644and sidecars with0o600..conffiles are written and restored with0o644while.route.jsonfiles retain0o600.