Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Floyd
    Guest

    Re: Problems with SlimServer 5.4.0 Cache Directory

    dean blackketter wrote:
    >The default is to create the cache directory in the home directory of the
    >user running slimserver. In the RPM, that's a new user called
    >"slimserver" which has its home in /usr/local/slimserver, which is ok.
    >
    >It sounds like you are using the RPM, but running under root. Not
    >recommended...


    I'm not running slimserver as root. It is started by the rc script with
    daemon --user slimserver. And if it was running as root, it would have
    been able to create the cache under /root. However, it does seem that
    it is getting the home directory of root as it's default cache directory.

    I tried tracing some things:

    In defaultCacheDir (Slim/Utils/Prefs.pm) $ENV{'HOME'} is /usr/slimserver
    (this is correct for how I laid out my installation) and defaultCacheDir
    returns "/usr/slimserver". This is without the --cachedir command line option.

    That's as far as I got for now. I'm sorry that I'm not familiar enough with
    the code to track this down.

    Also, if the cachedir is specified in /etc/slimserver.conf as:

    cachedir = /var/slimserver

    Why doesn't it use that directory when --cachedir is not on the command line.

  2. #2
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    Re: Problems with SlimServer 5.4.0 Cache Directory

    On Dec 17, 2004, at 10:32 AM, Floyd wrote:

    > dean blackketter wrote:
    >> The default is to create the cache directory in the home directory of
    >> the user running slimserver. In the RPM, that's a new user called
    >> "slimserver" which has its home in /usr/local/slimserver, which is
    >> ok.
    >>
    >> It sounds like you are using the RPM, but running under root. Not
    >> recommended...

    >
    > I'm not running slimserver as root. It is started by the rc script with
    > daemon --user slimserver. And if it was running as root, it would have
    > been able to create the cache under /root. However, it does seem that
    > it is getting the home directory of root as it's default cache
    > directory.

    Ah, ok. Thanks for the clarification. I see what's going on. The
    default path is determined before the process is switched to the new
    user. Probably not right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •