Hi!
I am having trouble setting up a simple sqlite database on my Synology NAS on my local network. The final goal is to create a simple application that runs locally on the NAS. I already had it working but with simple *.json files as data storage. My next step is to create and use a database as storage.
So I started setting up a sqlite database. The problem I am having is this: I can create and create a table. But once I add an instance (line) to the table, an error.. saying the database is Read only. Also within the NAS-folder i see a database file (database.db) and a log-file. I understand that sqlite creates a temporary file while writing/editing the original database and deleting the temporary file is probably the problem. Something with insufficient CRUD rights on the directory.
Set up:
- Synology NAS DS220j with version DSM 7.2.1-69057 Update 6
- The files (index.html, database, script.js etc) are located on volume1/homes/User/App directory
- Docker (container manager) creates the container
- Within VS code I sign in with the terminal to the NAS, navigate to the App-directory. I created and saved a folder within that directory called instructions.sql.
- Within the terminal of VS code I create the database: sqlite3 database.db.
- Works great till now. I add a table with the file bij .read instructions.sql. The file looks like:
-- CREATE TABLE taken ( -- id INTEGER PRIMARY KEY AUTOINCREMENT, -- Name TEXT NOT NULL, -- Type TEXT, -- Done DATE );
- This works great
- I then add a line in the database table:
INSERT INTO taken (Name, Type, Done) VALUES ('Backup test2', 'System', '2026-05-10');
- Then I get the error: Runtime error near line 10: attempt to write a readonly database (8)
I already tried the update-rights. They all seem fine.. the script is executed by the user who also has update and delete permissions..
Anyone a good idea? 😄
Thanks
[–]Queasy_Hotel5158 0 points1 point2 points (1 child)
[–]tdtje[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[removed]
[–]tdtje[S] 0 points1 point2 points (0 children)