Repository navigation
Conversation
…of /tmp The runners of GitHub Actions set fs.protected_regular, under which even root may not open a file of another user in a sticky directory such as /tmp with O_CREAT. An image test that lets PHP-FPM, as application, and a command run as root by docker exec write the same file there passes on a Docker host without the setting and fails in the CI, as the first run of webdevops#632 did.
|
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.



Summary
The first CI run of #632 failed in all
phpimages, although the same image test passed locally: a worker of PHP-FPM created a log file in/tmpasapplication, and the PHP CLI, run as root bydocker exec, could not append to it. The runners of GitHub Actions setfs.protected_regular, under which even root may not open a file of another user in a sticky directory such as/tmpwithO_CREAT; many local Docker hosts do not set it.AGENTS.mdnow tells agents to put such a file in/app, which belongs toapplicationand is not sticky.Changes
AGENTS.md, "Build and test": one bullet aftermake test-image: a file that a service writes asapplicationand a command of the test writes as root belongs in/app, not in/tmp, and why.No image changes.
How it was verified
From #632, on
php-nginx:8.5andphp-nginx:8.5-alpinewith a file that PHP-FPM creates first and the CLI then appends to, as root:/tmp/appfs.protected_regular=0(as on the Docker host of the check)fs.protected_regular=2(as on the runners)The CI run of #632 with the file in
/appis green.