You are here: Home » Topic » Change of runas creates SQL error

Change of runas creates SQL error

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #2924

    I am running Ubuntu 6.10, and trying to get Firefly svn-1696 working from the .deb file. I previously had the stable 2.4.2 installed on this machine and it was working fine, but decided to upgrade to the latest nightly. I removed the old version and manually deleted any files with “mt-daapd” located in their filename (i.e. mt-daapd.conf, mt-daapt.playlist, /var/cache/mt-daapd/). I then installed the new package from the .deb file using aptitude and configured it to point at my music, but noticed that the Bonjour service was not running according to the web server. It also didn’t find any songs. The share was shown in itunes, but there was no music associated with it. Some relevant log info from that run is below:

    2009-06-10 16:03:45 (b7ce56b0): Starting rendezvous daemon
    2009-06-10 16:03:45 (b7ce56b0): Starting signal handler
    2009-06-10 16:03:45 (b7ce56b0): Initializing database
    2009-06-10 16:03:45 (b7ce56b0): Full reload…
    2009-06-10 16:03:46 (b7ce56b0): Local Hostname bridgea-desktop.local already in use; will try bridgea-desktop-2.local instead
    2009-06-10 16:03:46 (b7ce56b0): Starting mp3 scan
    2009-06-10 16:03:46 (b7ce56b0): opendir: Permission denied
    2009-06-10 16:03:46 (b7ce56b0): Cannot open /home/bridgea/music/CCR- Travelin Band.mp3
    2009-06-10 16:03:46 (b7ce56b0): Skipping /home/bridgea/music/CCR- Travelin Band.mp3 – scan failed
    {Multiple similar messages for all mp3’s}
    2009-06-10 16:03:46 (b7ce56b0): Starting playlist scan
    2009-06-10 16:03:46 (b7ce56b0): Updating playlists
    2009-06-10 16:03:46 (b7ce56b0): Scanned 0 songs in 0 seconds
    2009-06-10 16:03:46 (b7ce56b0): Starting web server from /usr/share/mt-daapd/admin-root on port 3689
    2009-06-10 16:03:46 (b7ce56b0): Registering rendezvous names
    2009-06-10 16:03:46 (b7ce56b0): Serving 0 songs. Startup complete in 0 seconds

    This is similar in symptoms to the problem shown in this thread: viewtopic.php?f=3&t=4973

    I changed the runas from nobody to my current user name and restarted Firefly, only to find the web server down and a different startup in the logs. Here is the log for that startup:

    2009-06-10 16:06:06 (b7d736b0): Starting rendezvous daemon
    2009-06-10 16:06:06 (b7d736b0): Starting signal handler
    2009-06-10 16:06:06 (b7d736b0): db_sqlite2_open: unable to open database: /usr/var/cache/mt-daapd/songs.db (/usr/var/cache/mt-daapd/songs.db)
    2009-06-10 16:06:06 (b7d736b0): Error opening db: Misc SQL Error: unable to open database: /usr/var/cache/mt-daapd/songs.db


    Well, file permissions are a b*tch in Linux, aren’t they? 😉


    Permissions on the songs are wrong. The songs can not be read (executed?) by any user. Try chmodding all the files.


    Ok, that seemed to do it! Thanks! I just have a question or two for clarification in my mind. I initially had permissions set up for my user account, which i set the runas to. Is it standard to leave runas = nobody? Also, is that SQL error something to worry about? I don’t get it when runas = nobody, but i may eventually want to change the runas.


    Don’t worry about the SQL error.

    And the runas = nobody. This is done on purpose. Giving firefly no rights to do anything but that what he is supposed to do, making it very secure.


    Awesome! Thx for the info


    Well, the database is created under the runas user. And only this user has write permission to this file.

    So if you change the runas user, it can’t access the database. Thus you get the error.
    You generally shouldn’t change the runas user. If you still have to, delete the database file and let it create a new one.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Setup Issues’ is closed to new topics and replies.