Skip to content

581 have troubleshoot section for permissions related errors #583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/server/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
38 changes: 38 additions & 0 deletions src/server/troubleshoot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,42 @@ 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

You can check for `PermissionError` related errors using a built-in command line provided by <MainPlatformName />.
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 <MainPlatformName /> installation:

<MigrationType type="CE" />
```shell
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is already draft for bash script for this, maybe update accordingly

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 <EnterprisePlatformNameLink /> 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.
<MigrationType type="EE" />
```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
```
Loading