mardi 26 avril 2016

SQlite permissions

I'm trying to run a java application on a Linux embedded system which works with a SQlite database.

These are my db files:

root@tl5002:/home/DB# ls -li devices*
8481 -rwxrwxrwx 1 root root 7168 Jan  1  2007 devices.db
8475 -rwxrwxrwx 1 root root  571 Jan  1  2007 devices.sql

I'm logged as root and I'm the owner of both files, but when I try to run my application:

java -jar APP.jar

I get the following message, with errors:

[AssetFactory]Loading assets from database
Apr 26, 2016 12:45:27 PM com.almworks.sqlite4java.Internal log
INFO: [sqlite] DB[1]: instantiated [/media/data/devices.db]
Apr 26, 2016 12:45:28 PM com.almworks.sqlite4java.Internal log
INFO: [sqlite] Internal: loaded sqlite4java-linux-arm from /home/DB/libsqlite4java-linux-arm.so
Apr 26, 2016 12:45:28 PM com.almworks.sqlite4java.Internal log
INFO: [sqlite] Internal: loaded sqlite 3.7.10, wrapper 0.2
[14] unable to open database file
[-97] sqlite error
[-97] sqlite error
[AssetFactory]Loading 0 assets from database

It seems like I have no permissions to open the database file, but I'm root, and all files have rxw permissions.

Why my app cannot open the databases files?

Aucun commentaire:

Enregistrer un commentaire