The daemon writes its pidfile using os.umask(0) which results in world-wide-writeable pidfiles. The start-stop-daemon doesn't want to trust the pidfile content and therefore ignores a stop attemp.
Warnings:
Nov 15 01:55:43 kolab kolab-saslauthd[16880]: start-stop-daemon: matching on world-writable pidfile /run/kolab-saslauthd/kolab-saslauthd.pid is insecure Nov 15 01:55:45 kolab wallace[16995]: start-stop-daemon: matching on world-writable pidfile /run//wallaced/wallaced.pid is insecure
Example stop attemp with pidfile mode 0666
root@kolab ~ # systemctl start kolab-saslauthd root@kolab ~ # systemctl status kolab-saslauthd ● kolab-saslauthd.service - LSB: Start/Stop the Kolab SASL authentication daemon Loaded: loaded (/etc/init.d/kolab-saslauthd; generated) Active: active (running) since Fri 2019-11-15 10:05:30 CET; 5s ago Docs: man:systemd-sysv-generator(8) Process: 14162 ExecStart=/etc/init.d/kolab-saslauthd start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 4699) Memory: 12.1M CGroup: /system.slice/kolab-saslauthd.service └─14172 /usr/bin/python /usr/sbin/kolab-saslauthd -l warning --fork Nov 15 10:05:30 kolab systemd[1]: Starting LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:05:30 kolab systemd[1]: Started LSB: Start/Stop the Kolab SASL authentication daemon. root@kolab ~ # ls -la /run/kolab-saslauthd/kolab-saslauthd.pid -rw-rw-rw- 1 kolab kolab 6 Nov 15 10:05 /run/kolab-saslauthd/kolab-saslauthd.pid root@kolab ~ # systemctl stop kolab-saslauthd root@kolab ~ # systemctl status kolab-saslauthd ● kolab-saslauthd.service - LSB: Start/Stop the Kolab SASL authentication daemon Loaded: loaded (/etc/init.d/kolab-saslauthd; generated) Active: inactive (dead) since Fri 2019-11-15 10:05:46 CET; 2s ago Docs: man:systemd-sysv-generator(8) Process: 14162 ExecStart=/etc/init.d/kolab-saslauthd start (code=exited, status=0/SUCCESS) Process: 14233 ExecStop=/etc/init.d/kolab-saslauthd stop (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 4699) Memory: 12.3M CGroup: /system.slice/kolab-saslauthd.service └─14172 /usr/bin/python /usr/sbin/kolab-saslauthd -l warning --fork Nov 15 10:05:30 kolab systemd[1]: Starting LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:05:30 kolab systemd[1]: Started LSB: Start/Stop the Kolab SASL authentication daemon. Nov 15 10:05:46 kolab systemd[1]: Stopping LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:05:46 kolab kolab-saslauthd[14233]: start-stop-daemon: matching on world-writable pidfile /run/kolab-saslauthd/kolab-saslauthd.pid is insecure Nov 15 10:05:46 kolab systemd[1]: kolab-saslauthd.service: Succeeded. Nov 15 10:05:46 kolab systemd[1]: Stopped LSB: Start/Stop the Kolab SASL authentication daemon.
Example stop attempt with fixed pidfile mode:
root@kolab ~ # systemctl start kolab-saslauthd root@kolab ~ # systemctl status kolab-saslauthd ● kolab-saslauthd.service - LSB: Start/Stop the Kolab SASL authentication daemon Loaded: loaded (/etc/init.d/kolab-saslauthd; generated) Active: active (exited) since Fri 2019-11-15 10:07:24 CET; 3s ago Docs: man:systemd-sysv-generator(8) Process: 14678 ExecStart=/etc/init.d/kolab-saslauthd start (code=exited, status=0/SUCCESS) Nov 15 10:07:24 kolab systemd[1]: Starting LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:07:24 kolab kolab-saslauthd[14678]: start-stop-daemon: matching only on non-root pidfile /run/kolab-saslauthd/kolab-saslauthd.pid is insecure Nov 15 10:07:24 kolab systemd[1]: Started LSB: Start/Stop the Kolab SASL authentication daemon. root@kolab ~ # chmod 644 /run/kolab-saslauthd/kolab-saslauthd.pid root@kolab ~ # ls -la /run/kolab-saslauthd/kolab-saslauthd.pid -rw-r--r-- 1 kolab kolab 6 Nov 15 10:05 /run/kolab-saslauthd/kolab-saslauthd.pid root@kolab ~ # systemctl stop kolab-saslauthd root@kolab ~ # systemctl status kolab-saslauthd ● kolab-saslauthd.service - LSB: Start/Stop the Kolab SASL authentication daemon Loaded: loaded (/etc/init.d/kolab-saslauthd; generated) Active: inactive (dead) since Fri 2019-11-15 10:07:41 CET; 2s ago Docs: man:systemd-sysv-generator(8) Process: 14678 ExecStart=/etc/init.d/kolab-saslauthd start (code=exited, status=0/SUCCESS) Process: 14801 ExecStop=/etc/init.d/kolab-saslauthd stop (code=exited, status=0/SUCCESS) Nov 15 10:07:24 kolab systemd[1]: Starting LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:07:24 kolab kolab-saslauthd[14678]: start-stop-daemon: matching only on non-root pidfile /run/kolab-saslauthd/kolab-saslauthd.pid is insecure Nov 15 10:07:24 kolab systemd[1]: Started LSB: Start/Stop the Kolab SASL authentication daemon. Nov 15 10:07:41 kolab systemd[1]: Stopping LSB: Start/Stop the Kolab SASL authentication daemon... Nov 15 10:07:41 kolab systemd[1]: kolab-saslauthd.service: Succeeded. Nov 15 10:07:41 kolab systemd[1]: Stopped LSB: Start/Stop the Kolab SASL authentication daemon.