spamassassin errors on fresh Debian 7.1 Virtualmin install

Support,

(this is a new Debian 7.1 install, using latest Virtualmin install.sh)

I got an error message:

/etc/cron.daily/spamassassin: channel: attempt to rm channel cf file failed, attempting to continue anyway at /usr/bin/sa-update line 825. error: can't remove file /var/lib/spamassassin/3.003002/updates_spamassassin_org/50_scores.cf: Permission denied channel: attempt to rm channel directory failed, attempting to continue anyway at /usr/bin/sa-update line 828. error: failed to open /var/lib/spamassassin/3.003002/updates_spamassassin_org/10_default_prefs.cf for write: Permission denied at /usr/bin/sa-update line 1118. channel: archive extraction failed, channel failed error: can't remove file /var/lib/spamassassin/3.003002/updates_spamassassin_org/50_scores.cf: Permission denied channel: attempt to clean up failed extraction also failed! sa-update failed for unknown reasons

I found that there were many files owned by root in the /var/lib/spamassassin folder:

[code]# ls -laFR /var/lib/spamassassin

drwxr-xr-x 5 debian-spamd debian-spamd 4096 Aug 28 06:26 ./
drwxr-xr-x 48 root root 4096 Aug 27 22:20 …/
drwxr-xr-x 3 root root 4096 Aug 27 13:48 3.003002/
drwx------ 2 debian-spamd debian-spamd 4096 Aug 31 06:44 sa-update-keys/
drwx------ 2 debian-spamd debian-spamd 4096 Aug 28 06:26 .spamassassin/

./3.003002:
total 16
drwxr-xr-x 3 root root 4096 Aug 27 13:48 ./
drwxr-xr-x 5 debian-spamd debian-spamd 4096 Aug 28 06:26 …/
drwxr-xr-x 2 root root 4096 Aug 27 13:48 updates_spamassassin_org/
-rw-r–r-- 1 root root 2695 Aug 27 13:48 updates_spamassassin_org.cf

./3.003002/updates_spamassassin_org:
total 928
drwxr-xr-x 2 root root 4096 Aug 27 13:48 ./
drwxr-xr-x 3 root root 4096 Aug 27 13:48 …/
-rw-r–r-- 1 root root 8698 Aug 27 13:48 10_default_prefs.cf
-rw-r–r-- 1 root root 2375 Aug 27 13:48 10_hasbase.cf
-rw-r–r-- 1 root root 7607 Aug 27 13:48 20_advance_fee.cf
-rw-r–r-- 1 root root 8903 Aug 27 13:48 20_aux_tlds.cf
-rw-r–r-- 1 root root 7000 Aug 27 13:48 20_body_tests.cf
-rw-r–r-- 1 root root 1889 Aug 27 13:48 20_compensate.cf
-rw-r–r-- 1 root root 9726 Aug 27 13:48 20_dnsbl_tests.cf[/code]

I changed them by doing this:

[code]# chmod 770 /var/lib/spamassassin

chmod -R 660 /var/lib/spamassassin/*

chown -R debian-spamd:debian-spamd /var/lib/spamassassin[/code]

Thx!

Howdy,

I’m glad you got it figured out!

Unfortunately, the SpamAssassin package is provided by Debian, not by Virtualmin… Virtualmin just makes sure it’s installed using apt-get.

The errors you’re seeing above sound like something you may need to report to Debian.

-Eric

We had the same issue, but I suspect you must leave the directory /var/lib/spamassassin/sa-update-keys at 700 (rather than 770). Allowing the group to access the directory results in an error:

gpg: WARNING: unsafe permissions on homedir `/var/lib/spamassassin/sa-update-keys’

Our solution was to execute jimdunn’s commands (see message from Sat, 2013-08-31 13:59) plus the following command (to revoke permissions for the sa-update-keys directory again):

chmod 700 /var/lib/spamassassin/sa-update-keys

This seems to work.

Cheers
~ms

Thanks for the update, I’ve noticed (on Debian) that the sa-update-keys folder is in both:

-> /var/lib

and

-> /etc/spamassassin

And I also needed to use chmod -R 700 /var/lib/spamassassin/sa-update-keys to stop that gpg warning.

I did exactly what you described above, but it doesn’t seem to work for me. I keep getting:

/etc/cron.daily/spamassassin: config: path "/var/lib/spamassassin/3.003002/languages" is inaccessible: Permission denied config: path "/var/lib/spamassassin/3.003002/languages" is inaccessible: Permission denied mkdir /var/lib/spamassassin/3.003002/updates_spamassassin_org: Permission denied at /usr/bin/sa-update line 834 sa-update failed for unknown reasons

How can I get rid of those? Cheers!

JFYI:

I repeated all steps and CHMODs and it works now with no error messages being generated.
Sorry for bothering - seems I missed somthing in the 1st run :slight_smile:

Cheers.