bayes_journal - Bad permissions

Glenn Steen glenn.steen at gmail.com
Tue Nov 28 14:50:28 GMT 2006


On 28/11/06, Martin <martin.lyberg at gmail.com> wrote:
> Hi,
>
> I keep getting permission errors when learning messages through Mailwatch:
>
> SA_Learn: bayes: bad permissions on journal, can't read:
> /var/spool/MailScanner/spamassassin/bayes_journal
>
> This is my permissions of /var/spool/MailScanner/spamassassin/:
>
> drwxrws--- 2 postfix www-data   12288 2006-11-28 14:57 .
> drwxr-xr-x 6 postfix postfix     4096 2006-04-24 17:07 ..
> -rw-rwS--- 1 postfix www-data 1331200 2006-11-28 14:57 auto-whitelist
> -rw------- 1 postfix www-data   10632 2006-11-28 14:57 bayes_journal
> -rw-rwS--- 1 postfix www-data      36 2006-11-28 14:55 bayes.mutex
> -rw-rwS--- 1 postfix www-data 1318912 2006-11-28 14:53 bayes_seen
> -rw-rwS--- 1 postfix www-data 5160960 2006-11-28 14:55 bayes_toks
>
> Even if i change the permissions of bayes_journal. It keeps resetting
> the permissions.
>
> Any clues?
>
Hej Martin,

(Apart from this being the wrong mailing list:-)... Have you set
bayes_file_mode 0770
(at least) in either /etc/mail/spamassassin/local.cf or
/etc/mail/spamassassin/mailscanner.cf ?
Why do you have them all with s? Effective group is immaterial, since
these aren't executable... The only one that might have the effect you
want is the "." directory one:-). Do a
chmod 0660 *
to clear that (no, it doesn't hurt anything either, and don't clear it
on the directory:-).

Then check in MailScanner.conf that you have:
Incoming Work Permissions = 0660
Quarantine Permissions = 0660
as well as the
Run As User = postfix
Run As Group = postfix
Quarantine User = postfix
Quarantine Group = www-data

Most important is the bayes_file_mode "mask".

-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list