Bug 3585 - Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal
Summary: Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 major
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-10 11:47 UTC by Marc Perkel
Modified: 2004-08-27 09:54 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Perkel 2004-07-10 11:47:49 UTC
I'm running the latest 3.00 version and I keep getting this in the log:

cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal, Bayes db update
ignored: no such file or directory.

Why is it trying to go to the /tmp directory instead of the bayes_path directory?
Comment 1 Michael Parker 2004-07-10 11:53:34 UTC
Subject: Re:  New: Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

On Sat, Jul 10, 2004 at 11:47:50AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> 
> I'm running the latest 3.00 version and I keep getting this in the log:
> 

pre2?

If not, upgrade to pre2 and see if it goes away.

If so, then how are you starting and calling spamd?

Michael

Comment 2 Marc Perkel 2004-07-10 11:59:22 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

Yes - running pre2. Installed it this morning.

Here's me startup options

-d -x --max-conn-per-child=25 -u spamd

Comment 3 Dallas Engelken 2004-07-10 12:20:34 UTC
hmm.. this is the same issue as was addressed in bug 3334
Comment 4 Marc Perkel 2004-07-10 12:36:49 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

It apprears it wasn't fully addressed as I am still seeing the bug. 
Aparently - it's not fixed.

I've had this problem for some time. Just noticed we were up to pre2 and 
thought that it's something that really does need to be fixed.

bugzilla-daemon@bugzilla.spamassassin.org wrote:

>------- Additional Comments From dallase@nmgi.com  2004-07-10 12:20 -------
>hmm.. this is the same issue as was addressed in bug 3334
>
>  
>

Comment 5 Marc Perkel 2004-07-10 12:52:19 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

I don't know if this is significant - but I have moved the directory 
where I keep the bayes database in case there's something out there that 
is caching something.

Comment 6 Marc Perkel 2004-07-10 13:52:46 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

Here's part of my local.cf file

auto_whitelist_path /var/spamd/.spamassassin
auto_whitelist_file_mode 777

bayes_auto_learn_threshold_spam 15.0
bayes_auto_learn_threshold_nonspam -2.0
auto_whitelist_factor 0.2
bayes_path /var/spamd/.spamassassin/bayes
bayes_file_mode 777
bayes_expiry_max_db_size 800000

Comment 7 Michael Parker 2004-07-10 14:18:54 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

I don't believe it has anything to do with a local config change.

Can you look in your SpamAssassin.pm file, find the compile_now sub and
copy the last 5 lines or so, and then find the sed_path sub and copy
the last 3 lines or so.

Michael

Comment 8 Malte S. Stretz 2004-07-10 15:48:11 UTC
Just to clear up the /tmp-confusion: When spamd starts up, it once processes a 
single dummy message to ensure all modules are pre-loaded and variable caches 
are initialized. This is done with /tmp/spamd-$PID-init as the home dir. 
Comment 9 Marc Perkel 2004-07-10 16:58:56 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal



bugzilla-daemon@bugzilla.spamassassin.org wrote:

>
>Can you look in your SpamAssassin.pm file, find the compile_now sub and
>copy the last 5 lines or so, 
>
  # Backup default values which deal with userstate.
  # This is done so we can create any new files in, presumably, a temp dir.
  # see bug 2762 for more details.
  my %backup = ();
  if (defined $deal_with_userstate && $deal_with_userstate) {
    while(my($k,$v) = each %{$self->{conf}}) {
      $backup{$k} = $v if (defined $v && !ref($v) && $v =~/__userstate__/);
    }
  }


>and then find the sed_path sub and copy
>the last 3 lines or so.
>
>
>  
>
sub sed_path {
  my ($self, $path) = @_;
  return undef if (!defined $path);

  $path =~ s/__local_rules_dir__/$self->{LOCAL_RULES_DIR} || ''/ges;
  $path =~ s/__def_rules_dir__/$self->{DEF_RULES_DIR} || ''/ges;
  $path =~ s{__prefix__}{$self->{PREFIX} || $Config{prefix} || '/usr'}ges;
  $path =~ s{__userstate__}{$self->get_and_create_userstate_dir()}ges;
  $path =~ s/^\~([^\/]*)/$self->expand_name($1)/es;

  return Mail::SpamAssassin::Util::untaint_file_path ($path);
}

Comment 10 Michael Parker 2004-07-10 19:50:28 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

That code isn't from pre2.  Can you check and make sure you actually
installed the pre2 release.

Michael

Comment 11 Marc Perkel 2004-07-10 20:21:07 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

Well - I like to think I did.

Istalled as follows:

perl Makefile.pl
make
make install

So - what else do I need to do?


bugzilla-daemon@bugzilla.spamassassin.org wrote:

>http://bugzilla.spamassassin.org/show_bug.cgi?id=3585
>
>
>
>That code isn't from pre2.  Can you check and make sure you actually
>installed the pre2 release.
>
>Michael
>
>
>
>
>  
>

Comment 12 Marc Perkel 2004-07-10 20:31:55 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

I verified that I downloaded the latest version. The date on the file - 
the ZIP file - for SpamAssassin.pm id May 28.

Comment 13 Marc Perkel 2004-07-10 20:33:23 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

It appears that the ZIP file contents might not be the latest version. 
The unpacked distribution has a different date on that file.

Comment 14 Marc Perkel 2004-07-10 20:52:38 UTC
Subject: Re:  Bayes - cannot write to /tmp/spamd-XXX-init/.spamassassin/bayes_journal

OK - I have the latest version now and problem solved.

However -- the download page does not point to the latest and greatest 
version. You might want to fix that.

Comment 15 Michael Parker 2004-08-27 17:54:38 UTC
long fixed