node-red-nodes icon indicating copy to clipboard operation
node-red-nodes copied to clipboard

node-red-node-sqlite - "Error: SQLITE_READONLY: attempt to write a readonly database"

Open hevilp opened this issue 2 years ago • 1 comments

Which node are you reporting an issue on?

node-red-node-sqlite

What are the steps to reproduce?

I put my database into home folder (/home/dietpi/temps.db)

and used a fixed query in the node INSERT INTO temps (temperature) VALUES (30);

What happens?

I'm getting "Error: SQLITE_READONLY: attempt to write a readonly database"

What do you expect to happen?

A normal write - the database is read/write/executable with every user on system -> chmod 777 temps.db

I'm able to write with the sqlite3 CLI in the database

Whats wrong?

Please tell us about your environment:

  • [2.2.2 ] Node-RED version:
  • [v12.22.12 ] node.js version:
  • [6.14.16] npm version:
  • [DietPi v8.6.1] Platform/OS:
  • [ Firefox latest] Browser:

hevilp avatar Jul 25 '22 13:07 hevilp

I suspect you will be better asking this on the general Node-RED forum as it sounds more like something specific to DietPi rather than the node itself. I seem to recall DietPi has a special area where it stores application/user data rather than just under /home/dietpi but I don't run it day to day so can't be sure. Is odd that 777 doesn't give access but who owns the file ? (chown) etc...

dceejay avatar Jul 25 '22 17:07 dceejay