From 31b9c6962b3e9b7f96bf06093ee54da060002c9b Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Tue, 5 Jan 2021 14:05:14 +0100
Subject: [PATCH] change all references to the www-data user to 33

---
 README.md                | 4 ++--
 wp-cli-docker/Dockerfile | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index f43f16a..676e734 100644
--- a/README.md
+++ b/README.md
@@ -220,10 +220,10 @@ wp-content contents to the pod with the following command:
 $ kubectl cp uploads/ wordpress-master-0:/var/www/wp-uploads-mount
 ```
 
-You'll have to change the ownership of the files to the `www-data` user: 
+You'll have to change the ownership of the files to UID 33 (the `www-data` user in the WordPress container):
 
 ```bash
-$ kubectl exec -it wordpress-master-0 -- chown -R www-data:www-data /var/www/wp-uploads-mount
+$ kubectl exec -it wordpress-master-0 -- chown -R 33:33 /var/www/wp-uploads-mount
 ```
 
 Note: this will say 
diff --git a/wp-cli-docker/Dockerfile b/wp-cli-docker/Dockerfile
index 148235b..7a2b6a2 100644
--- a/wp-cli-docker/Dockerfile
+++ b/wp-cli-docker/Dockerfile
@@ -21,6 +21,7 @@ RUN chown -R 33:33 /var/local/ansible; \
 
 WORKDIR /var/local/ansible
 
-USER www-data
+# User 33 is www-data in the PHP container
+USER 33
 
 CMD ["ansible-playbook", "wpdeploy.yml", "-e", "@secrets/secret-vars.yaml"]
-- 
GitLab