Run queue worker as abc user - #297
Open
tiran133 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
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.
Description:
Run the BookStack async queue worker as the
abcuser usings6-setuidgid.A corresponding changelog entry has also been added to
readme-vars.yml.Benefits of this PR and context:
The queue worker currently inherits root privileges from s6, while PHP-FPM runs as the
abcuser.If the queue worker is the first process to write to
/config/log/bookstack/laravel.log, such as during a transient Redis failure, the file is created asroot:rootwith mode0644. PHP-FPM cannot subsequently append to it, causing Laravel logging to throw anUnexpectedValueExceptionand web requests to return HTTP 500 errors.Running the queue worker as
abc:PUIDandPGID.How Has This Been Tested?
docker build --no-cache --pull.PUID=1000,PGID=1000, andQUEUE_CONNECTION=redis.1000:1000./config/log/bookstack/laravel.logas1000:1000with mode0644.1000:1000.bash -nandgit diff --checksuccessfully.Source / References:
AI assistance disclosure:
The issue investigation and preparation of this change were assisted by OpenAI Codex. The resulting diagnosis, code change, and validation results were reviewed by the contributor.