On 5/22/23 14:48, ceo@sartrack.nz wrote:
Thanks; There has never been a 'Mailman' user. I do have a www-data user (all Apache2 data' and there is a 'list' user.
So what I refer to as the Mailman user (a generic term) is list
in
your case.
I may have run the import fuction as root, but I then used chown() to set the directory tree /var/lib/mailman3/* to user 'list'.
OK
So I upgraded Debian 10 to Debian 11. This also upgraded Apache2 I assume, but I kept the original (single) config file.
I then installed the whole Mailman3 package with 'apt'. I may also have installed additional missing bits afterwards, as I think it was not complete. I initially tried to use MariaDB but the installation failed completly because it never asked for the MariaDB root password, and as a result of that everyting else failed too. Then I un-installed 5 times, and then I finally went for the 'default' database system.
I then edited the file with the recommended settings for Mailman3: Alias /mailman3/favicon.ico /var/lib/mailman3/web/static/postorius/img/favicon.ico Alias /mailman3/static /var/lib/mailman3/web/static
<Directory "/var/lib/mailman3/web/static"> Require all granted </Directory>
<IfModule mod_proxy_uwsgi.c> ProxyPass /mailman3/favicon.ico ! ProxyPass /mailman3/static ! ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost/ </IfModule>
So clearly Apache2 manages to access the data supplied by Postorius because it sees the lists (at least the empty ones). -What user should the whole system running under: 'list'? of 'www-data'?
- Is there anything else I should tell Apache2?
All the web based stuff is a Django application. Django is run by uWSGI which probably runs as www-data, but Django only accesses hyperkitty, postorius and django-mailman3 and other Django related tables in the database. It doesn't need access to file system files other than things like wsgi.py, urls.py, settings.py and settings_local.py and only read access to these.
All the mailman3 file system stuff has to be read/write/searchable by
list
.
Now I tried to use "django-admin createsuperuser". This also fails because of this error: ImportError: cannot import name 'force_text' from 'django.utils.encoding' (/usr/local/lib/python3.9/dist-packages/django/utils/encoding.py) And I cannot find where this 'force_text' is called from. It must be removed as it is too old.
It seems your Django installation is broken. Do
cd /usr/local/lib/python3.9/dist-packages/django grep -r force_text
to find where force_text is called, or maybe add
def force_text(s, encoding='utf-8', strings_only=False, errors='strict'): return force_str(s, encoding, strings_only, errors)
to /usr/local/lib/python3.9/dist-packages/django/utils/encoding.py
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan