Hi,

On Thu Feb 19, 2026 at 5:49 AM CET, Michael Paoli wrote:
> My successfully tested workaround
> (at least covering use under mailman3-web):
>
> $ diff -U 4 /etc/init.d/mailman3-web{.BAK,}
> --- /etc/init.d/mailman3-web.BAK        2019-06-07 18:03:29.000000000 +0000
> +++ /etc/init.d/mailman3-web    2026-02-19 04:42:45.000000000 +0000
> @@ -33,8 +33,14 @@
>  do_start () {
>      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
>          --test >/dev/null|| return 1
>
> +    # https://bugs.debian.org/1128380 work-around:
> +    if [ -f $PIDFILE ]; then
> +        chmod o-w $PIDFILE
> +    else
> +        (umask 022 && >> $PIDFILE)
> +    fi
>      start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
>          -- $DAEMON_ARGS || return 2
>  }
>
> $

uwsgi does not try to mess with umask of existing pidfiles. Should it? I'm
not sure how this is used by external scripts... My guess is that scripts
using uwsgi --pidfile should set umask as they wish and correctly cleanup
left over pidfiles if uwsgi crashes.

systemd users are clearly not concerned, not using pidfiles in default
conf.

Conclusion: I think mailman3-web needs fixing, maybe removing exiting pidfiles
before starting uwsgi, or using start-stop-daemon --remove-pidfile. But I'm
open to discussions, maybe looking at chmod'ing existing pidfiles at uwsgi
startup.

Thanks,

Alex

Reply via email to