fix(workspaces): chown ephemeral WP core so wp-admin installs pick direct FS - #9
Merged
Merged
Conversation
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
pcfreak30
marked this pull request as ready for review
September 24, 2026 23:02
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.
Copies of WordPress core under /var/www/html were left root-owned, so get_filesystem_method() failed its owner comparison and wp-admin plugin installs fell back to FTP and failed with an unable-to-connect error. wp-init.sh now chowns the docroot, wp-admin, wp-includes and top-level core files to the runtime user on every boot, without recursing into the persistent wp-content mounts. The end-to-end verifier asserts the core owner matches the runtime uid.
Description
Fixes WordPress admin plugin/theme installs failing with
unable_to_connect_to_filesystembecause the WordPress core files were owned byroot.Problem
WordPress decides which filesystem method to use via
get_filesystem_method(). It only selects thedirectmethod when the runtime user owns the core files it compares against its temp-file probe. Because the WordPress core was copied asroot(cp -afrom/usr/src) and left root-owned, the filesystem check failed and WP fell back to FTP/credentials mode, which cannot work in this containerized environment.Changes
images/wordpress/wp-init.shfix_core_ownership()which changes ownership of the WordPress core files (docroot,wp-admin/,wp-includes/, and top-level files) to the runtime application user.wp-content/because persistent mounts there can be arbitrarily large (especiallyuploads/).scripts/verify-wordpress.sh/var/www/html/wp-admin/includes/file.php, ensuring thedirectfilesystem method will be used going forward.Impact
WordPress admin can now install, update, and delete plugins/themes through the UI without filesystem credential errors.