Error accessing service.db on startup

Getting this when starting matrix-os on the Pi:

pi@matrix:~/matrix-os$ sudo setcap cap_net_raw+eip $(eval readlink -f which node)
pi@matrix:~/matrix-os$ NODE_ENV=rc node index.js
Environment Selected: rc
Loading Core Matrix Files
Loading… device
Loading… event
Loading… service
Not using device data from db, using MATRIX_DEVICE_ID and MATRIX_DEVICE_SECRET instead!
Uncaught exception: { Error: EACCES: permission denied, open '/home/pi/matrix-os/db/service.db’
at Error (native)
errno: -13,
code: ‘EACCES’,
syscall: ‘open’,
path: ‘/home/pi/matrix-os/db/service.db’ } Error: EACCES: permission denied, open '/home/pi/matrix-os/db/service.db’
at Error (native)
UNKNOWN ERROR! Error: EACCES: permission denied, open '/home/pi/matrix-os/db/service.db’
at Error (native)
Unable to clean, exitting…
pi@matrix:~/matrix-os$ which setcap
pi@matrix:~/matrix-os$ ls -al /home/pi/matrix-os/db/service.db
-rw-r–r-- 1 root root 52 Mar 5 17:48 /home/pi/matrix-os/db/service.db

I searched and did not see anything specific to service.db. But I did notice a post about permissions on firebase which suggested removing matrix-firebase and reinstalling via npm install. Is this the same issue? Otherwise does the user need +r for service.db?

After reading a suggested article, I reinstalled the whole node_modules directory (rm -rf node_modules && npm install) but that did not help.

Thanks in advance!

Brut force worked: sudo chmod 777 db/*

Still no idea why this popped up.