Have you checked to make sure the ID that you are using (interactively) is permitted read/write access to the directory containing the db files and to the files themselves? I mean *actually* checked that you have permission, since I doubt that the CGI process is running with the same ID you are using to logon.
--- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Luiz Américo >Sent: Wednesday, 26 September, 2018 20:05 >To: General Discussion of SQLite Database >Subject: [sqlite] Can write to database using API but get an error on >writing with sqlite3.exe > >I have a 1GB database configured to use WAL mode. > >It's accessed by short lived CGI processes, under windows 2008 >server. Each >process usually opens the database, execute a select or >update/insert, >close the connection and finishes. It uses c api >(sqlite3_open, sqlite3_prepare, sqlite3_step) of dll downloaded from >sqlite.org. > >All operations are working fine (reading, writing to the database). >Those >processes are started ~1 to 5 per second > >There's a ~5MB wal and shm file that are being updated frequently > >When i open the same database with sqlite3.exe (or an external tool >like >Sqlite Expert) i can do read commands (select), but when i try to >write to >database (UPDATE / ALTER TABLE) it gives a "Attempt to write a read >only >database" error. > >The tools are executed in the same machine as the datafile > >If i try to open a (smaller, less accessed) database in the same >folder as >the main one all writing operations are allowed in the external tools > >Any hints on what's going on? > >Luiz >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users