You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2006/05/27 02:26:07 UTC

[Bug 4923] New: $HOME/.spamassassin directory not created, files created in /

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923

           Summary: $HOME/.spamassassin directory not created, files created
                    in /
           Product: Spamassassin
           Version: 3.1.2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Learner
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: lists@johnmecham.com


I installed 3.1.2 from source and some unexpected behavior happened.
I ran 'sa-learn --sync' (I do this to create the inital bayes files for a given
user) and typically this would create a .spamassassin directory (in the home
directory of the user that runs it) and place the initial bayes files there.
Instead it created the bayes files in the machine's root directory (when I ran
it as 'root'). With no user's bayes files on the system, when I ran
'sa-learn --sync' as another user, it appears it also tried to create the
inital bayes files in the machine's root directory but does not have permission
to write there, so: "bayes: expire_old_tokens: locker: safe_lock: cannot create
tmp lockfile /bayes.lock.host.example.5996 for /bayes.lock: Permission denied".
If I manually create the .spamassassin directory, the bayes files are placed 
there. In the past I also would run 'spamassassin --lint -D' and this would
create a user_prefs file in the .spamassassin directory (and create the 
directory if needed), but this no longer happens (but it does create
auto-whitelist; in the .spamassassin directory if it exists, or
/auto-whitelist if it does not).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4923] $HOME/.spamassassin directory not created, files created in /

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.1.3




------- Additional Comments From felicity@apache.org  2006-05-31 21:13 -------
More fallout from bug 4827 it seems.  The problem is that sa-learn sets dont_copy_prefs in the M::SA 
object at creation, so therefore the userprefs_dir never gets created.  Then when the bayes db tries to get 
created, bayes_path is set to "__userstate__/bayes", and "__userstate__" resolves to "" (blank) since it 
doesn't exist, so the end path becomes "/bayes".

I'd say that the solution is to find places like this (BayesStore::DBM::tie_db_readonly):

  my $path = $main->sed_path($main->{conf}->{bayes_path});

and replace sed_path with find_existing_path(), then check for undef and flag the failure.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4923] $HOME/.spamassassin directory not created, files created in /

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4923] $HOME/.spamassassin directory not created, files created in /

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923


Bug 4923 depends on bug 4932, which changed state.

Bug 4932 Summary: [review] userprefs_dir not created anymore / userprefs warning incorrect
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4932

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4923] $HOME/.spamassassin directory not created, files created in /

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |4932




------- Additional Comments From felicity@apache.org  2006-05-31 21:37 -------
hrm.  looked into this a little more.  first, don't use first_existing_path() since the path may not exist for 
various reasons.

second, the bigger issue is that the current code, and the latest patch for bug 4932, doesn't fix this...  
basically, M::SA::get_and_create_userstate_dir() won't create the userstate directory if dont_copy_prefs is 
set to true, which it is by sa-learn.

ok, so I put in a new patch for 4932 which will always create the userstate directory (the old behavior), and 
we'll just set this ticket up as a child ticket.  gah.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 4923] $HOME/.spamassassin directory not created, files created in /

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4923


felicity@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From felicity@apache.org  2006-06-01 14:36 -------
ok, the patch from bug 4932 was committed for 3.1.3, so I'm going to close this ticket. :)



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.