Weblog entry #7 for GoodTimes

spamassassin and autolearning
Posted by GoodTimes on Sun 15 Oct 2006 at 19:03
Tags: none.
bayes: locker: safe_lock: cannot create lockfile /home/aaron/.spamassassin/bayes.mutex: Permission denied

over and over and over again in my logs. But...why?

 

Comments on this Entry

Posted by GoodTimes (69.17.xx.xx) on Sun 15 Oct 2006 at 19:38
[ Send Message | View Weblogs ]
it appears that it should work

my config looks like



OPTIONS="--create-prefs --max-children 5 --helper-home-dir"

from the man

the default behaviour is to setuid() to the user running "spamc",

so, who is running spamc?

with a little fancy looping ps/grep work, i found /usr/bin/spamc -u aaron in the process table

which tells me...

-u username - This argument has been semi-obsoleted. To have spamd use per-user-config files, run spamc as the user whose config files spamd should load. If you're running spamc as some other user, though, (eg. root, mail, nobody, cyrus, etc.) then you can still use this flag.

well, that's clear enough

going to attempt to set the bayes_path to a central location and run for a while to see if that's it.

the problem seems to be that spamc runs as nobody with a -u argument for a user. it then passes that to spamd which notices that spamc is running as user nobody and then setuid to nobody and then tries to lock files in my directory.

it would seem that i could get around this by making sure that nobody can write to that, but i don't see anything saying that's a good idea, a secure idea, the right idea

[ Parent | Reply to this comment ]

Posted by GoodTimes (69.17.xx.xx) on Sun 15 Oct 2006 at 19:57
[ Send Message | View Weblogs ]
aaron

ahah

i found this bug for spamassassin 360984

all i needed to do was figure out exactly what the problem was

and i realized i was chasing the symptom, not the problem

the log message above it was

handle_user unable to find user: 'sales'
spamd[22291]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/sbin/spamd line 1146, <gen986> line 4.

and then it would error out on the mutex

well, that makes sense, it was probabaly looking up information for that user "sales" which doesn't exist and then for some reason, trying to do the autolearn thing

so, once this bug gets moving, i'll figure out if i have to do any more work

[ Parent | Reply to this comment ]