Thanks. I'll modify the script to run as mail. Can you think of why it wouldn't always happen? I'd expect running the script would always change the ownership, but it's been well over a month (the script is run every couple of days) and this is the first time its happened.
And any not both files? Chris -----Original Message----- From: Bob Proulx [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 9:37 AM To: [EMAIL PROTECTED] Subject: Re: Bayes databases losing file ownership 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