Quantcast
Channel: Squeezebox : Community : Forums - Logitech Media Server
Viewing all articles
Browse latest Browse all 5300

Problem when accessing LMS SQLite3 library database file

$
0
0
Hi,

I access the LMS library.db SQLite database file with my Apache webserver to get some information about my music library. When I restart LMS I can play music fine but my webserver is unable to open the library.db file, I get the following error:

Code:

root@ATOM-Standort:/var/www# /etc/init.d/logitechmediaserver restart
Restarting squeezeboxserver.
root@ATOM-Standort:/var/www# su - www-data
$ sqlite3 /var/lib/squeezeboxserver/cache/library.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
Error: unable to open database file
sqlite>

But I can open the DB as root:

Code:

root:~# sqlite3 /var/lib/squeezeboxserver/cache/library.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name            file                                                     
---  ---------------  ----------------------------------------------------------
0    main            /var/lib/squeezeboxserver/cache/library.db               
sqlite>

And the strange thing is this: If I try to open the database after root has accessed it, my webserver can access it also. If I restart LMS I have the same situation - database is kind of locked for www-data/webserver user until root once opens the database.

Is there some kind of locking mechanism LMS has on the library database? I already checked the LMS logs, there is no scan running at this time. How can I allow my webserver to access the library.db without having to unlock it every time as root?

Thanks
Frank

Viewing all articles
Browse latest Browse all 5300

Trending Articles