Package: rrdcached Version: 1.4.8-1 Severity: normal This is a copy of an issue reported at https://github.com/oetiker/rrdtool-1.x/issues/476
Hello, In the manual you state: "so you really should create a separate user just for this daemon.", so i just did. But the daemon still ran under root, so after digging into linux, i realized, i have to edit the chuid parameter for the command start_stop_daemon in the /etc/init.d/rrdcached (1). Starting the service gave me a fatal error, it could not create the pid file in /var/run . If i see this right, i have to create a subdirectory in /var/run for this service by root before starting the service, as only root have write permission in /var/run (2). So i've edited the init.d script to create a directory and chown it to my user at the very start (3). Now setting the socket and pid parameters to the new path in the /etc/defaults/rrdcached file and starting the service gives the error again as it tries to create the pid file in the wrong place. In the init.d script there is a variable set PIDFILE=/var/run/rrdcached.pid and the start-stop-service uses this instead of what i specified in the defaults file's $OPT variable (-p parameter). And i guess the daemon gets the wrong pidfile too: start-stop-daemon --start --pidfile "$PIDFILE" --exec $DAEMON -- $OPTS -p "$PIDFILE" i guess if there are two -p options, the second overwrites the first, so setting -p in the defaults $OPT is meaningless, you have to use $PIDFILE (4) 1) you should support external setting to the init.d chuid parameter in the defaults file 2) if the chuid user is specified then the default path should be /var/run/rrd/ for the pid and socket file so less privileged users could create these entries 3) you should create if necessary the default path in the init.d script by root. if the chuid user is specified then you should chown this dir to the specified chuid user 4) you should make an example PIDFILE entry in the installed defaults script and discourage using -p there -- System Information: Debian Release: jessie/sid APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.13-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages rrdcached depends on: ii libc6 2.18-5 ii libcairo2 1.12.16-2 ii libdbi1 0.9.0-2 ii libglib2.0-0 2.40.0-3 ii libpango-1.0-0 1.36.3-1 ii libpangocairo-1.0-0 1.36.3-1 ii libpng12-0 1.2.50-1 ii librrd4 1.4.8-1 ii libxml2 2.9.1+dfsg1-3 rrdcached recommends no packages. rrdcached suggests no packages. -- Configuration Files: /etc/default/rrdcached changed [not included] /etc/init.d/rrdcached changed [not included] -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org