Fix SELinux denials and "Text file busy" on SSH fleet provisioning#3712
Merged
peterschmidt85 merged 1 commit intomasterfrom Mar 27, 2026
Merged
Fix SELinux denials and "Text file busy" on SSH fleet provisioning#3712peterschmidt85 merged 1 commit intomasterfrom
peterschmidt85 merged 1 commit intomasterfrom
Conversation
The shim binary download uses cp to copy from /tmp to /usr/local/bin/. This causes two issues: 1. "Text file busy" (ETXTBSY) when re-provisioning without cleanup, because cp tries to write to a running executable. Revert to mv which atomically replaces the directory entry. 2. On SELinux-enforcing hosts (RHEL, Rocky), mv from /tmp preserves the user_tmp_t context. Add chcon to set the correct bin_t context. No-op on non-SELinux systems via 2>/dev/null || true. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
un-def
approved these changes
Mar 27, 2026
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
cpback tomvto fix "Text file busy" (ETXTBSY) errors when re-provisioning an SSH fleet without host cleanup —cpfails on a running executable, whilemvatomically replaces the directory entrychconaftermvto set correct SELinux context (bin_t) for the shim binary — on SELinux-enforcing hosts (RHEL, Rocky, CentOS), files moved from/tmpretainuser_tmp_tcontext which blocks execution; no-op on non-SELinux systemsCompanion to #3702 which fixed the same SELinux issue for the service file and env file.
Test plan
🤖 Generated with Claude Code