• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

Probleme beim Upgrade von Spamassassin / sa-compile

WolleKette

New Member
Hallo,

seit neuestem liefert ein apt upgrade immer eine Fehlermeldung, 1 Paket wäre nicht vollständig konfiguriert und in der Folge ein Permission denied

Code:
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up sa-compile (3.4.2-1~deb9u1) ...
Running sa-compile (may take a long time)
bayes: cannot open bayes databases /etc/MailScanner/bayes/bayes_* R/O: tie failed: Permission denied
bayes: cannot open bayes databases /etc/MailScanner/bayes/bayes_* R/O: tie failed: Permission denied
Nov 15 08:46:28.621 [4967] info: rules: meta test FORGED_MUA_EUDORA has dependency 'MAILING_LIST_MULTI' with a zero score
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100/body_neg100.so': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100/.packlist': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/bases_body_neg100.pl': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/Mail/SpamAssassin/CompiledRegexps/body_0.pm': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004001/Mail/SpamAssassin/CompiledRegexps/body_neg100.pm': Operation not permitted
chmod: changing permissions of '/var/lib/spamassassin/compiled/5.024/3.004002/Mail/SpamAssassin/CompiledRegexps/body_0.pm': Operation not permitted
dpkg: error processing package sa-compile (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 sa-compile
E: Sub-process /usr/bin/dpkg returned an error code (1)

Wenn ich sa-compile einfach so starte, dann gibt es keine Fehlermeldung.
Ich habe sowohl apt upgrade als auch sa-compile als root (sudo su -) gestartet.

Die Berechtigungen für die angemeckerten Dateien bayes Dateien sind wie folgt:
Code:
-rw-rw---- 1 root www-data   49464 Nov 15 09:07 /etc/MailScanner/bayes/bayes_journal
-rw-rw---- 1 root www-data  679936 Nov 13 09:34 /etc/MailScanner/bayes/bayes_seen
-rw-rw---- 1 root www-data 5427200 Nov 15 06:25 /etc/MailScanner/bayes/bayes_toks

Ein dpkg -s sa-compile liefert den Status: install ok half-configured

Bei meinem System handelt es sich um ein Debian 9 (stretch)

Hat jemand einen Tipp für mich, wie ich das wieder in Ordnung bringen könnte?
 
Benutzt du Plesk?

Ich hatte auf einem lokalen Server gestern dein Problem mit Spamassassin.
Ich habe spamc spamd sa-compile spamassassin mit aptitude entfernt und spamassassin ohne sa-compile neu installiert.
Heute nochmal auf einem meienr Test-VM getestet, da geht es ohne Probleme. War wohl wirklich das Debian-Paket, was ein Installerproblem hatte.
 
Last edited by a moderator:
Nein, ich benutze kein Plesk.
Es handelt sich um unsere Firewall, die bis vor kurzem von einer Firma gemanget und von diesen auch installiert wurde. Leider machen die das nicht mehr.

Daher auch die Frage, wie siehts bei der De-/Neuinstallation der Pakete mit der Konfiguration aus? Da die das eingerichtet haben, würde ich mindestens mal in's schwitzen kommen, wenn ich das neu machen müsste.
 
Soweit ich das sehe, muss der user mit dem Spamassasin läuft Schreib-Zugriff auf die bayes Dateien haben:

ps aux | grep -i spam

popuser 6934 0.1 2.4 171496 97684 ? S 06:39 0:28 spamd child

-rw------- 1 popuser popuser 12288 Nov 15 06:37 /var/qmail/mailnames/???????/????/bayes_toks
 
Sorry for writeing in english. Mein Deutsch ist nicht gut genug.

The files should not be owned by root
Code:
https://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg515084.html

This helped me (files with paths extracted from the error message).
Code:
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/Mail/SpamAssassin/CompiledRegexps/body_0.pm'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/Mail/SpamAssassin/CompiledRegexps/body_neg100.pm'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/bases_body_neg100.pl'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100/body_neg100.so'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_neg100/.packlist'
chown debian-spamd:0 '/var/lib/spamassassin/compiled/5.024/3.004002/Mail/SpamAssassin/CompiledRegexps/body_0.pm'
 
Many thanks for that tip. And of course, englisch ist no problem.

After changing the ownership of the 3 files in /etc/MailScanner/bayes/ and the whole tree under /var/lib/spamassassin/compiled/ to debian-spamd:debian-spamd, the apt upgrade runs without problems.

And also, dpkg -s sa-compile shows Status: install ok installed :)
 
Back
Top