You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Matt Kettler <mk...@evi-inc.com> on 2005/01/28 23:10:50 UTC

Re: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied

At 04:26 PM 1/28/2005, Chris Harvey wrote:
>cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored:
>Permission denied
>
>This is right after all the bayes token statements. It suggests it's a
>problem, but I don't seem to be able to fix it.
>
>My default bayes location is /root/.spamassassin and I've tried making
>permissions on it wide open (777). The files in it are:

First, I assume you're using a bayes_path statement to force the bayes DB 
for all users to be in roots homedir.

If so, DO NOT proceed..

In order for your bayes DB to be wide open, ALL users must have r_x access 
to /root... that's a bad thing that you don't want to give them.

move it to someplace in /var, /etc, /usr/share, or some other directory 
normal users can safely have read access to the directory.

Also, be sure to set SA's bayes_file_mode to 777 in your local.cf, 
otherwise SA will just change the permisisons every time it updates the file.


RE: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied

Posted by Chris Harvey <sa...@e-harvey.com>.
Ok, now I'm noticing this

Creating default_prefs [/root/.spamassassin/user_prefs]
Creating default_prefs [/root/.spamassassin/user_prefs]

Is there a file path I can set so that the new working directory is my new
.spamassasin directory I created?

I specifically set the bayes and the autowhitelist paths, I'm assuming
there's a general path statement I can set also, although I didn't see it in
the manuals.


RE: cannot write to /root/.spamassassin/bayes_journal, Bayes db update ignored: Permission denied

Posted by Chris Harvey <sa...@e-harvey.com>.
> 
> First, I assume you're using a bayes_path statement to force the bayes DB
> for all users to be in roots homedir.

Yep!

> 
> If so, DO NOT proceed..

> In order for your bayes DB to be wide open, ALL users must have r_x access
> to /root... that's a bad thing that you don't want to give them.

Done. I just opened up the directory rather than the files within it. They
still have the same permissions.

> move it to someplace in /var, /etc, /usr/share, or some other directory
> normal users can safely have read access to the directory.

Changed to a different location as you suggested.

> Also, be sure to set SA's bayes_file_mode to 777 in your local.cf,
> otherwise SA will just change the permisisons every time it updates the
> file.

Did that too. 

Now in the log I see it looks much better.

debug: bayes token 'H*c:NHxtPHrt' => 0.152853685441601
debug: bayes: score = 4.01130517690973e-10
debug: bayes: 21457 untie-ing
debug: bayes: 21457 untie-ing db_toks
debug: bayes: 21457 untie-ing db_seen
debug: madiff: left: 0, orig: 11, max-difference: 0.00%

The strange thing is I temporarily had opened up /root/.spamassassin to be
wide open but still got the same results. So I can only think it must have
been the file_mode setting which made a fundamental difference.

Anyway, looks much better now thanks!

Chris