Message1030

Author admin
Recipients
Date 2024-06-27.11:47:08
Content
[Bugzilla user: frank@altpeter.de]
[Bugzilla date: 2024-06-27T09:47:08+00:00]

I'm sorry but I have to disagree.

Using a clean and fresh installation, using no configuration file (e.g. using the compiled defaults), using --trace and using root as running uid for testing, and getting a readable and writable index file with almost all settings that are processed by the init process, but stopping at the

INSERT INTO GlobalProperties VALUES (1, "6");

with an execute error, doesn't sound like a permission problem to me. Additionally, the error message in question doesn't read "permission denied" or "file not found" or similar, but 

SQLite execute error: no such column: "6" - should this be a string literal in single-quotes?

Besides that, before I get bumped between upstream and FreeBSD downstream up and forth, I would like to make sure that it's definitely not an upstream problem I'm facing here.

But, as far as I can see, the problem with an incorrect INSERT statement is present in the code:

root@murphy:...orthanc/work 0# grep -r 'INSERT INTO GlobalProperties' Orthanc-1.12.3 
Orthanc-1.12.3/OrthancServer/Sources/Database/InstallTrackAttachmentsSize.sql:INSERT INTO GlobalProperties VALUES (6, 1);  -- GlobalProperty_GetTotalSizeIsFast
Orthanc-1.12.3/OrthancServer/Sources/Database/PrepareDatabase.sql:INSERT INTO GlobalProperties VALUES (1, "6");

As you can see, the file InstallTrackAttachmentsSize.sql wants to

INSERT INTO GlobalProperties VALUES (6, 1); 

while the file PrepareDatabase.sql wants to

INSERT INTO GlobalProperties VALUES (1, "6");

and latter is exactly what the first invocation of Orthanc is complaining.

I can confirm this theory by manually doing it after the initial run:

root@murphy:.../etc/orthanc 255# sqlite3 OrthancStorage/index 
SQLite version 3.46.0 2024-05-23 13:25:27
Enter ".help" for usage hints.
sqlite> INSERT INTO GlobalProperties VALUES (1, "6");
Parse error: no such column: "6" - should this be a string literal in single-quotes?
  INSERT INTO GlobalProperties VALUES (1, "6");
                            error here ---^
sqlite> INSERT INTO GlobalProperties VALUES (1, 6);
sqlite> 

After this, Orthanc starts as expected.


So, if you're still sure to see a FreeBSD related permission problem here, let me know. I'm quite curious.
History
Date User Action Args
2026-07-29 15:51:29adminlinkissue227 messages
2026-07-29 15:51:29admincreate