Change of runas creates SQL error

This topic contains 6 replies, has 3 voices, and was last updated by  fizze 7 years, 11 months ago.

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

    Anonymous

    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

    #18617

    fizze
    Participant

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

    #18616

    EVILRipper
    Participant

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

    #18618

    Anonymous

    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.

    #18619

    EVILRipper
    Participant

    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.

    #18615

    Anonymous

    Awesome! Thx for the info

    #18620

    fizze
    Participant

    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)
  • You must be logged in to reply to this topic.
Register here