[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#267784: /sbin/start-stop-daemon: start-stop-daemon doesn't set $HOME correctly



Package: dpkg
Version: 1.10.23
Severity: normal
File: /sbin/start-stop-daemon

i've created a simple init script that runs btlaunchmany (the
bittornado version),
the exec should run as an unprivileged user, it should cd in
a particular directory and it should run in it (then it's
task is to find any torrent file and to begin the downloading/uploading
process).

the scripts use start-stop-daemon because i need to easily grep
the process's pid and it run it with this option:
DAEMON_HOME -> the dir context in which the executable should be run
DAEMON_OPTION -> some tornado related option
DEMON_USER -> the user that should run the DAEMON_FULLPATH exec

DAEMON_OPTION="$DAEMON_HOME --max_upload_rate 15"

                start-stop-daemon --start --pidfile $DAEMON_PIDFILE \
                --exec $DAEMON_FULLPATH --chdir $DAEMON_HOME \
                --chuid $DAEMON_USER \
                --make-pidfile -- \
                $DAEMON_OPTION >> $DAEMON_LOG &
now the problem is that this script was used to work a month ago,
after my holiday i upgraded the system and this script is broken
it seems like the start-stop-daemon "forget" to export the HOME variable
and that gets stucked to /root.

obiouvsly if DAEMON_USER=root the whole thing works like a charm

this is the btlaunchmany output (when DAEMON_USER!=root):
  File "/usr/bin/btlaunchmany", line 84, in ?
      configdir = ConfigDir('launchmany')
        File "/usr/lib/python2.3/site-packages/BitTornado/ConfigDir.py",
        line 103, in __init__
            os.mkdir(self.dir_icons)
            OSError: [Errno 13] Permission denied: '/root/.BitTornado/icons'


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.1
Locale: LANG=it_IT, LC_CTYPE=it_IT

Versions of packages dpkg depends on:
ii  dselect                     1.10.23      a user tool to manage Debian packa
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an

-- no debconf information



Reply to: