Can only do "runas = root"

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2949
    jwbodnar
    Participant

    Hi folks,

    I built Firefly from the svn-1376 and svn-1441 revisions to run on my Buffalo Linkstation LS2 (mipsel) running Free Link. I wanted a version that could still run in a small footprint but had support for RSP (in order to run FirePlay or stream to my Roku Soundbridge) in addition to DAAP. I don’t need transcoding, and the versions downloadable from the Debian repositories aren’t packaged for embedded systems because they are built to use Avahi which needs D-Bus which is packaged to depend on X, making the simple 1 MB or so mt-daapd package require a couple of hundred MB once all of the dependencies are factored in.

    Anyway, I have absolutely no problems when “runas = root”or when I launch mt-daapd as root with “mt-daapd -d 9 -f” to run it in the foreground. However, if I try to start mt-daapd with /etc/init/mt-daapd when “runas = any_other_user”, it does not start and leaves the following errors in the log file:

    2009-10-27 01:16:57 (00004000): Initializing database
    2009-10-27 01:16:57 (00004000): Query: vacuum
    2009-10-27 01:16:57 (00004000): Error: unable to open database file
    2009-10-27 01:16:57: Aborting
    2009-10-27 01:16:57 (00004000): Rendezvous socket closed (daap server crashed?) Aborting.
    2009-10-27 01:16:57: Aborting

    I should be a bit more explicit about this.

    I can launch mt-daapd once with “runas = any_other_user”, and it builds the db. If I /etc/init.d/mt-daapd stop or restart, I get the error above. I can also build the db when “runas = root” or launching “mt-daapd -d 9 -f” as above and have the service work fine. Then, if I stop mt-daapd, change “runas =” to any other valid user account, it bombs with the error above.

    It doesn’t matter whether the user specified for “runas =” is “nobody”, “mt-daapd”, or a system user like “daemon”, it still crashes with the same error. In any of these cases, I have changed the owner of /var/cache/mt-daapd to “nobody”, “mt-daapd”, “daemon”, etc. and given the user and group read/write/execute permissions for /var/cache/mt-daapd and read/write permission for the db file. Nothing changes the result.

    I must be missing something super-obvious here. Does mt-daapd need some basic system utility to run that might be missing or damaged on my Free Linked Buffalo Linkstation? I’m really at a loss for what to do now other than to just go with “runas = root”.

    #18667
    EVILRipper
    Participant

    The database was probably created as root. Therefore, any other user doesn’t have the permission to read/write the database. Try chmodding the db, or deleting it and then start firefly as user=nobody.
    Deleting the database will force firefly to create a new one from scratch.

    #18666
    jwbodnar
    Participant

    The database was probably created as root. Therefore, any other user doesn’t have the permission to read/write the database. Try chmodding the db, or deleting it and then start firefly as user=nobody.
    Deleting the database will force firefly to create a new one from scratch.

    mt-daapd errors out with the same error whether the database is created by root (regardless of whether it is chown’ed to the alternate user or not) or by the user under which it runs.

    Are there other files accessed that might require certain permissions or ownership?

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