Database / BetterDB Interview questions
How do you troubleshoot license persistence failing with EACCES errors?
The symptom is an EACCES error writing license.jwt after mounting a fresh volume at BETTERDB_DATA_DIR (default /app/data).
The cause is a UID mismatch: the container runs as UID 1001, but a newly created Docker volume is typically owned by root, so the process can't write into it.
The fix is to chown the volume to 1001 before BetterDB ever starts – for example, running a disposable Alpine container against the same named volume first: docker run --rm -v betterdb-data:/d alpine chown 1001:1001 /d, then mounting that same volume at /app/data when you start BetterDB Monitor for real.
The same class of problem can resurface later if you ever recreate the volume, restore it from a backup taken with different ownership, or move the deployment to a different orchestrator with its own default volume permissions, so it's worth checking ownership as a first step whenever license state mysteriously stops persisting, rather than assuming the license itself is bad.
More Related questions...