Chris Blaise wrote:
> 
>       spamd runs as mail and that's what the bayes_ files are owned as.  A
> few days ago we started seeing an increase in spam and looking into the
> problem today, I found that the bayes_toks file (but not bayes_seen) was
> owned as root.
> 
>       Anyone have any ideas what could cause this?

Running spamd as 'root' instead of 'mail', most likely.  When it
writes the files they will be owned by the current user.  If they are
owned by root then the current user at that moment was the root user.
Since the superuser has permissions to take over any file but the
reverse is not allowed this is a one-way street.  That is, a mistake
can latch into this mode and running as the 'mail' user can't fix it.

>       We do run a script that runs as root that calls sa-learn
> occasionally.  Could that interaction somehow cause the file ownership to be
> changed?  If so, any recommendations for the proper locking between spamd
> and sa-learn?

That is probably your problem.  Run that script as the 'mail' user.
The root user can do this easily enough.

  su mail -c "sa-learn --options-here"

Bob

Reply via email to