From 63e03c2b96a1430204d0cc58d6a4963ff52537c2 Mon Sep 17 00:00:00 2001 From: Fernando Ribeiro Date: Thu, 13 Mar 2025 10:05:51 +0000 Subject: [PATCH 1/4] Add permissions related troubleshooting guide #581 --- src/server/troubleshoot/index.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/server/troubleshoot/index.md b/src/server/troubleshoot/index.md index 4e2e250c..4617ee9d 100644 --- a/src/server/troubleshoot/index.md +++ b/src/server/troubleshoot/index.md @@ -41,4 +41,29 @@ Logs should contain information about sending emails with task `mergin.celery.se ```shell [2024-12-09 10:37:16,265: INFO/ForkPoolWorker-2] Task mergin.celery.send_email_async[3e50df69-90c1-49be-b31c-78f1fb417500] succeeded in 0.11469305199989321s: None +``` + +## Permissions + +If you get `PermissionError` related errors, please redo the following steps on your installation: + + +```shell + export MERGIN_DIR=/path/to/your/projects + sudo mkdir -p $MERGIN_DIR + sudo find $MERGIN_DIR -type f -exec sudo chmod 640 {} \; + sudo find $MERGIN_DIR -type d -exec sudo chmod 750 {} \; + sudo find $MERGIN_DIR -type d -exec sudo chmod g+s {} \; + sudo chown -R 901:999 $MERGIN_DIR +``` + +For a complementary step needs to be made for the `overviews` mounted folder that enables Maps on the platform. + +```shell + export MERGIN_DIR=/path/to/your/overviews + sudo mkdir -p $MERGIN_DIR + sudo find $MERGIN_DIR -type f -exec sudo chmod 640 {} \; + sudo find $MERGIN_DIR -type d -exec sudo chmod 750 {} \; + sudo find $MERGIN_DIR -type d -exec sudo chmod g+s {} \; + sudo chown -R 901:999 $MERGIN_DIR ``` \ No newline at end of file From 15bae5d14bb41adfea8cbefc0e00ea9f4b8f1d93 Mon Sep 17 00:00:00 2001 From: Fernando Ribeiro Date: Thu, 13 Mar 2025 11:32:25 +0000 Subject: [PATCH 2/4] Include also permission check example output #581 --- src/server/install/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/install/index.md b/src/server/install/index.md index 82862537..a31e3d8f 100644 --- a/src/server/install/index.md +++ b/src/server/install/index.md @@ -82,6 +82,7 @@ Output will be similar to the next snippet. The utility will try to provide some Error: No base URL set. Please set MERGIN_BASE_URL environment variable Error: No contact email set. Please set CONTACT_EMAIL environment variable Database initialized properly + Permissions granted for /data folder Celery running properly ``` From 16ead81a50f70c02e40d9ce3169267aca743ba6c Mon Sep 17 00:00:00 2001 From: Fernando Ribeiro Date: Tue, 18 Mar 2025 11:11:48 +0000 Subject: [PATCH 3/4] Add the new CLI permissions command --- src/server/troubleshoot/index.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/server/troubleshoot/index.md b/src/server/troubleshoot/index.md index 4617ee9d..f9e0d26d 100644 --- a/src/server/troubleshoot/index.md +++ b/src/server/troubleshoot/index.md @@ -45,7 +45,20 @@ Logs should contain information about sending emails with task `mergin.celery.se ## Permissions -If you get `PermissionError` related errors, please redo the following steps on your installation: +You can check for `PermissionError` related errors using a built-in command line provided by . +Just log to the main `server` container and run the following: + +```shell + docker exec merginmaps-server flask server permissions +``` + +The command line also accepts a specific path provided by the user (defaults to `/data`): + +```shell + docker exec merginmaps-server flask server permissions --path /my/path +``` + +If you have `PermissionError` related errors, please redo the following steps on your installation: ```shell From 5332e006d3aa6fe186a57e709c2c813d5285d257 Mon Sep 17 00:00:00 2001 From: Fernando Ribeiro Date: Mon, 24 Mar 2025 10:12:36 +0000 Subject: [PATCH 4/4] Changes following GH reviews --- src/server/troubleshoot/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/troubleshoot/index.md b/src/server/troubleshoot/index.md index f9e0d26d..c4f040be 100644 --- a/src/server/troubleshoot/index.md +++ b/src/server/troubleshoot/index.md @@ -70,7 +70,7 @@ If you have `PermissionError` related errors, please redo the following steps on sudo chown -R 901:999 $MERGIN_DIR ``` -For a complementary step needs to be made for the `overviews` mounted folder that enables Maps on the platform. +For a complementary step needs to be made for the `overviews` mounted folder that enables [Webmaps](https://merginmaps.com/docs/manage/dashboard-maps/) on the platform. ```shell export MERGIN_DIR=/path/to/your/overviews