From: Tom Williams <tomdkat@co...> - 2006-12-19 02:58:14
Paul Lesniewski wrote:
> Also, I think I have hinted to both of you that you should try to run
> sa-learn as the correctly permissioned user, and I have yet to hear if
> you have tried this and what happened as a result.
Ok, I just finished doing this. It's a permission problem as evidenced
by this message:
bayes: locker: safe_lock: cannot create tmp lockfile
/root/.spamassassin/bayes.lock: Permission denied
Of course, root's home dir has permissions of 700. How did I get this
info? The main Apache server runs as root but the children run as
"httpd". So, I added a "-D" parameter to my "sa-learn" command, like this:
/usr/bin/sa-learn -D --spam --configpath=/etc/spamassassin
--username=user@... 2> /tmp/spam_buttons.log <
The key is to redirect stderr to the output file. Then I viewed the
spam_buttons.log file and found all kinds of permission denied errors.
Why sa-learn is wanting to use /root/.spamassassin for everything, I
don't know, but it's possibly a SA configuration issue.
As an experiment, I changed the permissions of /root to 777 and viola,
*RESULTS FROM REPORT:* (0)
 => Learned tokens from 1 message(s) (1 message(s) examined)
So, I need to figure out the permission issue. crap.