Skip to content

fix(wordpress): set plugin ownership before post-install commands#28

Merged
vitormattos merged 1 commit into
mainfrom
fix/polylang-post-install-permissions
May 14, 2026
Merged

fix(wordpress): set plugin ownership before post-install commands#28
vitormattos merged 1 commit into
mainfrom
fix/polylang-post-install-permissions

Conversation

@vitormattos
Copy link
Copy Markdown
Member

Summary

This fix prevents startup crashes when a custom plugin post-install command needs write access to the plugin directory (for example, creating integrations/ACF symlink in polylang-pro).

Root cause

finalize_custom_plugin() was running post_install_commands as www-data before adjusting ownership of the cloned plugin directory. Since cloning is done as root, some commands failed with Permission denied and broke the bootstrap flow.

Change

  • In .docker/wordpress/entrypoint.sh, run chown -R www-data:www-data "$plugin_dir" before run_custom_plugin_post_install_commands.

Validation

  • Rebuilt WordPress image and restarted service.
  • Confirmed container remained running.
  • Checked logs for regressions (Permission denied, Fatal error, Class not found) and found none after the fix.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the fix/polylang-post-install-permissions branch from 5c2ae58 to a2f7b7a Compare May 14, 2026 15:38
@vitormattos vitormattos merged commit ab38f43 into main May 14, 2026
2 checks passed
@vitormattos vitormattos deleted the fix/polylang-post-install-permissions branch May 14, 2026 15:39
@vitormattos vitormattos restored the fix/polylang-post-install-permissions branch May 14, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant