From b73da87c0b9ed21bb877550f53f4896f7624f175 Mon Sep 17 00:00:00 2001 From: Alexandra Branco Date: Mon, 2 Sep 2024 22:40:11 +0100 Subject: [PATCH 1/2] Added information about permissions errors when migrating docker images to alpine. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index b9f7a66d5..846be6e89 100644 --- a/README.md +++ b/README.md @@ -614,6 +614,14 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som docker-compose exec app chown -R www-data:www-data /var/www/html/custom_apps ``` +If you already use Nextcloud with Docker but want to upgrade to Alpine Docker Images, initially you may experience permissions errors because in Alpine Images the user with permissions for the `/var/www` folder are different. +So, you must change the permissions of the `/var/www` folder to be compatible with Alpine: + +```console +docker exec container-name chown -R www-data:root /var/www +``` + +After changing the permissions, restart the container and the permission errors should disappear. # Help (Questions / Issues) **If you have any questions or problems while using the image, please ask for assistance on the Help Forum first (https://help.nextcloud.com)**. From 4e9aceb7a95d3e7268256bf28ca05b91f0fc3319 Mon Sep 17 00:00:00 2001 From: Alexandra Branco Date: Sun, 29 Sep 2024 17:37:55 +0100 Subject: [PATCH 2/2] Updated README.md documentation after review. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 846be6e89..98f5e5a9d 100644 --- a/README.md +++ b/README.md @@ -614,11 +614,13 @@ You're already using Nextcloud and want to switch to docker? Great! Here are som docker-compose exec app chown -R www-data:www-data /var/www/html/custom_apps ``` -If you already use Nextcloud with Docker but want to upgrade to Alpine Docker Images, initially you may experience permissions errors because in Alpine Images the user with permissions for the `/var/www` folder are different. -So, you must change the permissions of the `/var/www` folder to be compatible with Alpine: +## Migrating from a non-Alpine image to an Alpine image + +If you already use one of our non-Alpine images, but want to switch to an Alpine-based image, you may experience permissions problems with your existing volumes. This is because the Alpine images uses a different user ID for `www-data`. +So, you must change the ownership of the `/var/www/html` (or `$NEXTCLOUD_DATA_DIR`) folder to be compatible with Alpine: ```console -docker exec container-name chown -R www-data:root /var/www +docker exec container-name chown -R www-data:root /var/www/html ``` After changing the permissions, restart the container and the permission errors should disappear.