# Gramps web sync - insufficient permissions

**URL:** <https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470>\
**Category:** Gramps Web\
**Tags:** sync\_tool\
**Created:** [November 19, 2024, 10:21am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470 "2024-11-19T10:21:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 19, 2024, 10:21am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/1 "2024-11-19T10:21:34Z")

</div>

I have just installed the gramps web sync addon on Win10, trying to connecting to my gramps web instance I get the following error message:

`Server authorization error: insufficient permissions.`

I have tried this with an owner account and an admin account. I also get the same error if the password is either right or wrong.

I think my versions of Gramps and Gramps Web compatable, what am I doing wrong?

| Windows10: | Gramps Web: |
| --- | --- |
| GRAMPS: AIO64-5.2.2-r1-f905d14 | Gramps 5.2.3 |
| Python: 3.11.8 | Gramps Web API 2.5.2 |
| BSDDB: 6.2.9 (6, 0, 30) | Gramps Web Frontend 24.10.0 |
| sqlite: 3.45.2 (2.6.0) | Gramps QL 0.3.0 |
| LANG: en\_GB.UTF-8 | Sifts 1.0.0 |
| OS: Windows | locale: en |
| | multi-tree: false |
| | task queue: true |
| | OCR: true |
| | chat: false |

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [November 19, 2024, 10:41am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/2 "2024-11-19T10:41:27Z")

</div>

Hi, please share the Gramps Web logs (`docker compose logs grampsweb`) for the relevant time period.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 19, 2024, 12:22pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/3 "2024-11-19T12:22:36Z")

</div>

Log file can be found [here](https://pastebin.com/ZjcX7WCh)

I attempted to connect with gramps web sync just before collecting this log file, there appears to be no mention of the connection in the logs however.

---

<div class="post-metadata">

**Author:** ![codefarmer](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@codefarmer](https://gramps.discourse.group/u/codefarmer)\
**Post date:** [November 19, 2024, 4:40pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/4 "2024-11-19T16:40:08Z")

</div>

This stands out in the log but I can’t say for sure because I work only with SQLite. As a test you could use different Gramps Family Tree which is stored using SQLite as opposed to BSDDB.

`grampsweb | ValueError: Database backend 'bsddb' of tree 'Gramps Web' not supported.`

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [November 19, 2024, 7:51pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/5 "2024-11-19T19:51:49Z")

</div>

Indeed this error means that something is very wrong with your set up.

Is Gramps Web actually working at all?

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 20, 2024, 7:06am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/6 "2024-11-20T07:06:58Z")

</div>

This is a file I got from a gramps backup, is there a sample tree I could use that we know to be void of any errors?

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 20, 2024, 7:10am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/7 "2024-11-20T07:10:49Z")

</div>

Gramps Web is up and appears functional. I can go to the various tree types, look at different people and I have added a test person.

Where should I start to diagnose the error? One of the first things I want to do is use a sample tree, if one exists, to see if it’s a import file issue.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 20, 2024, 8:27am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/8 "2024-11-20T08:27:54Z")

</div>

Is there a way to convert my database from BSDDB to SQLite?

BSDDB seems to be from before Gramps 5.1 and has it’s own flaws, one glaring one is that it can easily corrupt.

[https://www.gramps-project.org/wiki/index.php/Database\_Backends](https://www.gramps-project.org/wiki/index.php/Database_Backends)

Suprised that while not supported I can see everyone, but I have recently noticed some issues with it that was going to be my next port of call. But this could be one and the same issue with unsupported DB type. I have one person who married, had kids, divorced and remarried. I see this person twice in the “Relationship Graph”. Not sure if this is intended.

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [November 20, 2024, 2:03pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/9 "2024-11-20T14:03:09Z")

</div>

Gramps Web does not work with BSDDB. So if Gramps Web is up and functional, you must have a SQLite database.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 22, 2024, 4:05pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/10 "2024-11-22T16:05:12Z")

</div>

Right, so I’m still a bit stuck here.

I removed all Gramps volumes on Docker to start fresh. Once passed the first time run screen I added a single person through Gramps Web to an empty database, I did not import anything. On Desktop I loaded in the example.gramps file provided with Gramps and attempted to use the gramps web sync.

I am still faced with the same error:

> Server authorization error: insufficient permissions.

The gramps web [logs](https://pastebin.com/jB3s7SZT) are better this time, having not used my own, seemingly broken, database. Still not indication there was a connection attempt or anything that I can use to trace my error.

My nginx-proxy logs also show nothing for the attempted connection using gramps web sync, they do log when I connect to gramps web via a browser. Is there any other means of debugging this?

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [November 23, 2024, 8:05pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/11 "2024-11-23T20:05:55Z")

</div>

You can add the following to the `grampsweb` docker compose service to enable debug logging:

`command: "python3 -O -m gunicorn -w 2 -b 0.0.0.0:5000 --timeout 120 --limit-request-line 0 --preload --log-level debug gramps_webapi.wsgi:app"`

You should see a request to `/api/token`. The error you’re getting is only shown when the request returns status 403.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [November 23, 2024, 10:44pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/12 "2024-11-23T22:44:46Z")

</div>

Thank you for the command for the dockerfile.

I’m not seeing anything come up in `docker compose logs grampsweb` or `docker compose logs nginx-proxy`. Could something else be blocking the access before it reaches the server?

I also tried `docker compose up` (without -d) and still not showing anything in logs when i try to connect via gramps web sync.

Would having the url help?

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [November 24, 2024, 8:03am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/13 "2024-11-24T08:03:18Z")

</div>

A typo in the URL might also explain it. It should start with `https://`.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [December 4, 2024, 2:41pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/14 "2024-12-04T14:41:20Z")

</div>

I have [https://gramps.malakan.co.uk](https://gramps.malakan.co.uk) as the Server URL

I’m still getting the same issue and I’m not observing any logs relevant to the connection.

I could give you access my gramps instance if you think that could help?

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [December 4, 2024, 2:55pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/15 "2024-12-04T14:55:13Z")

</div>

You might want to use private messaging for that.

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [December 4, 2024, 2:59pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/16 "2024-12-04T14:59:00Z")

</div>

No, not needed, because the issue is most likely on the desktop side. I am not using Windows, which makes it difficult. Which version of the addon are you running?

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [December 4, 2024, 3:13pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/17 "2024-12-04T15:13:42Z")

</div>

The addon version is 1.1.2

In an attempt to see if it would help I am also now running the latest Gramps version on Windows 10:

```python
GRAMPS: AIO64-5.2.3-r1-aa03f5a 
Python: 3.11.9 
BSDDB: 6.2.9 (6, 0, 30) 
sqlite: 3.46.0 (2.6.0)
LANG: en_GB.UTF-8
OS: Windows

```

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [December 4, 2024, 3:41pm UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/18 "2024-12-04T15:41:58Z")

</div>

Do you still get `Server authorization error: insufficient permissions.` or a different error? As you can see [here](https://github.com/DavidMStraub/gramps-web-sync/blob/main/grampswebsync.py#L413-L416) this error can _only_ happen if the server responds with 403, and if it does respond, it means you reached it and something _must_ show up in the logs if you enabled debug logging.

Please also look at the nginx-proxy logs, if you’re using that.

---

<div class="post-metadata">

**Author:** ![Malakan](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/malakan/32/9250_2.png) [@Malakan](https://gramps.discourse.group/u/Malakan)\
**Post date:** [December 5, 2024, 11:22am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/19 "2024-12-05T11:22:34Z")

</div>

Yes, I see the same error still.

I have looked at the proxy logs and don’t see anything, I have looking into enabling more logging on nginx but still don’t see the connection attempts. I’m also not versed in nginx so am still looking into the logging.

I do see a response from a test container and from grampsweb itself, just not the 403 error.

> helloworld | [::ffff:172.19.0.4]:44146: response:200  
> grampsweb | [2024-12-05 09:29:25 +0000] [14] [DEBUG] GET /  
> grampsweb | [2024-12-05 09:29:25 +0000] [13] [DEBUG] GET /lang/en.json  
> grampsweb | [2024-12-05 09:29:25 +0000] [14] [DEBUG] GET /api/metadata/  
> grampsweb | [2024-12-05 09:29:25 +0000] [13] [DEBUG] GET /manifest.json  
> grampsweb | [2024-12-05 09:29:25 +0000] [13] [DEBUG] POST /api/translations/en  
> grampsweb | [2024-12-05 09:29:25 +0000] [14] [DEBUG] GET /api/users/-/  
> grampsweb | [2024-12-05 09:29:25 +0000] [14] [DEBUG] GET /api/search/  
> grampsweb | [2024-12-05 09:29:25 +0000] [13] [DEBUG] GET /api/events/  
> grampsweb | [2024-12-05 09:29:25 +0000] [14] [DEBUG] GET /api/sources/  
> grampsweb | [2024-12-05 09:29:27 +0000] [14] [DEBUG] GET /sw.js

---

<div class="post-metadata">

**Author:** ![DavidMStraub](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davidmstraub/32/7_2.png) [@DavidMStraub](https://gramps.discourse.group/u/DavidMStraub)\
**Post date:** [December 5, 2024, 11:35am UTC](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470/20 "2024-12-05T11:35:16Z")

</div>

What URL did you enter in the host field in the sync addon and under what URL do you access Gramps Web in the browser?

[Next page](https://gramps.discourse.group/t/gramps-web-sync-insufficient-permissions/6470.md?page=2)
