From 5d7642660116aaf1b7e3af73cc6a4ee0ad090f03 Mon Sep 17 00:00:00 2001 From: Timothy Mugo Date: Tue, 21 Jul 2026 16:08:38 +0300 Subject: [PATCH 1/2] chore: update wordpress version image and files and folders permissions --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ee2449c..55918299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ RUN mkdir -p wp-content/plugins \ RUN chown -R 82:82 wp-content \ && tar -caf /wp-content.tgz --exclude="**/node_modules" wp-content -FROM wordpress:6.9.1-fpm-alpine AS runtime +FROM wordpress:7.0.2-fpm-alpine AS runtime LABEL org.opencontainers.image.description="WordPress image for Data Viz" LABEL org.opencontainers.image.authors="Development Gateway " LABEL org.opencontainers.image.url="https://github.com/devgateway/data-viz-wordpress" @@ -57,5 +57,9 @@ COPY --chmod=755 wordpress.sh /usr/local/sbin/ EXPOSE 80 443 +# Update permissions for WordPress files and directories +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html + ENTRYPOINT ["/usr/local/sbin/wordpress.sh"] CMD ["php-fpm"] \ No newline at end of file From c88207dbce089006b4c3147bdd49d0f4becf8e0c Mon Sep 17 00:00:00 2001 From: Timothy Mugo Gachengo <55899373+timothygachengo@users.noreply.github.com> Date: Tue, 21 Jul 2026 19:42:07 +0300 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 55918299..fd774305 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,9 +57,10 @@ COPY --chmod=755 wordpress.sh /usr/local/sbin/ EXPOSE 80 443 -# Update permissions for WordPress files and directories -RUN chown -R www-data:www-data /var/www/html \ - && chmod -R 755 /var/www/html +# Ensure WordPress core remains read-only for the PHP user; only wp-content needs to be writable +RUN chown -R www-data:www-data /var/www/html/wp-content \ + && find /var/www/html -type d -exec chmod 755 {} + \ + && find /var/www/html -type f -exec chmod 644 {} + ENTRYPOINT ["/usr/local/sbin/wordpress.sh"] CMD ["php-fpm"] \ No newline at end of file