OneDrive personal destination is failing

Synology DSM 7.1, Duplicacy Web 1.7.2 (installed as a package, not Docker).
FTTH internet. Using OneDrive personal as the destination.
After around an hour of running the backup, it fails with the following errors:

2023-03-17 12:47:33.039 INFO ONEDRIVE_RETRY Response code: 503; retry after 640 milliseconds
2023-03-17 12:50:59.757 ERROR UPLOAD_CHUNK Failed to upload the chunk c61b7c81f2ddb5734fae65147a16a9f4e98e6e96d1ef3fdd0a374b1bfedf9798: open /volume1/Duplicacy/XXX/one-token.json: permission denied
2023-03-17 12:51:01.481 INFO INCOMPLETE_SAVE Incomplete snapshot saved to /tmp/duplicacy/repositories/localhost/0/.duplicacy/cache/XXX/incomplete_snapshot
Failed to upload the chunk c61b7c81f2ddb5734fae65147a16a9f4e98e6e96d1ef3fdd0a374b1bfedf9798: open /volume1/Duplicacy/XXX/one-token.json: permission denied

Files are being written to the destination (around 90gb so far)
I’ve tried reducing the threads, throttling bandwidth and even deleted and re-generated the one-token.json file.

Any thoughts as to what could be causing the issue?

This is a first time installation, by the way.

I mean, it tells you that permission is denied… Have you checked permissions on the token file? I can imagine it is trying to refresh access token, and failing to write to this file. Incidentally, lifetime of the access token is about 1 hour, perhaps a little bit more.

Many thanks! I misread the error, thinking it meant permission denied to OneDrive, which is ultimately the case because the token file couldn’t be updated. The duplicacy system account had read only permission to the folder containing the token. Changing to read/write fixed the problem.