
April 15, 2025
10:24 p.m.
- On 4/16/25 00:06, Sam Darwin via Mailman-users wrote:
su - -u list -s /bin/bash -c "pwd"
That fails on Ubuntu 24.04. Did you mean sudo instead of su? su doesn't have a -u flag. Or which operating system were you on?
Yes, Linux-based su doesn't support the -u option, but sudo does. Probbably an oversight.
The correct call would be:
su - -s /bin/bash -c "mailman-web makemigrations --merge" list
or, if you don't want to run it in a login shell:
su -s /bin/bash -c "mailman-web makemigrations --merge" list
But, all this said, mailman-web is typically already a wrapper calling su -s /bin/bash -c "python3 .../path/to/manage.py $*" www-data, so why should it be wrapped in another wrapper with a different user? The list user is typically used by the mailman-wrapper wrapper.
Mihai