You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by John Fleming <jo...@wa9als.com> on 2004/05/24 01:00:42 UTC

? permissions lockfile

I was watching my maillog for another reason and noticed the error below.
SpamAssassin appears to be working properly in spite of the error, but I'm
not sure what problems might be inherent in the problem.  My bayes data is
in /var/.spamassassin, owner and group root, permissions 755.  Should these
be different, e.g. spamd be the owner/group??  Thanks any specific help and
insights!  I don't really understand the lock files at all.  Here are the
pertinent log entries:

May 23 17:52:16 localhost spamd[8627]: bayes: lock: 8627 cannot create tmp
lockfile /var/.spamassassin/bayes.lock.Luke.8627 for
/var/.spamassassin/bayes.lock: Permission denied
May 23 17:52:26 localhost spamd[8627]: identified spam (7.0/5.0) for
wesley:510 in 10.6 seconds, 10704 bytes.
May 23 17:52:26 localhost postfix/local[8616]: 581A9AFAB5:
to=<we...@wa9als.com>, relay=local, delay=11, status=sent
("|/usr/bin/procmail")

Thanks - John



Re: ? permissions lockfile

Posted by Matt Kettler <mk...@evi-inc.com>.
At 03:24 PM 5/24/2004, David B Funk wrote:
> >          2) your bayes_file_mod MUST be 666
>                                   ^^^^^^^^^^^
>
>That is, unless you are one of the people who actually read the
>SA conf documentation and see:
>
>       bayes_file_mode          (default: 0700)
>           The file mode bits used for the Bayesian filtering database files.
>
>           Make sure you specify this using the 'x' mode bits set, as it may
>           also be used to create directories.  However, if a file is
>           created, the resulting file will not have any execute bits set
>           (the umask is set to 111).
>
>Then of course, you will use:
>     bayes_file_mod 777
>
>(that's for 2.5* & 2.6*, havn't played with 3.0 yet)
>
>But other than that, Matt's advice is bang on. ;)


Doh! You're 100% correct David.

That's what I get for posting on a weekend while half-asleep.





Re: ? permissions lockfile

Posted by David B Funk <db...@engineering.uiowa.edu>.
On Sun, 23 May 2004, Matt Kettler wrote:

> If you're forcing a global bayes database in local.cf you must set up one
> of two secenarios:
>
> The first scenario ensures everyone can read/write/delete and create files
> in the directory and that it doesn't matter who owns them:
>
>          1) the permissions of the directory MUST be 777.  (yes, that's
> WORLD write).
>
>          2) your bayes_file_mod MUST be 666
                                  ^^^^^^^^^^^

That is, unless you are one of the people who actually read the
SA conf documentation and see:

      bayes_file_mode          (default: 0700)
          The file mode bits used for the Bayesian filtering database files.

          Make sure you specify this using the 'x' mode bits set, as it may
          also be used to create directories.  However, if a file is
          created, the resulting file will not have any execute bits set
          (the umask is set to 111).

Then of course, you will use:
    bayes_file_mod 777

(that's for 2.5* & 2.6*, havn't played with 3.0 yet)

But other than that, Matt's advice is bang on. ;)

-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Re: ? permissions lockfile

Posted by Matt Kettler <mk...@comcast.net>.
At 06:00 PM 5/23/04 -0500, John Fleming wrote:
>I was watching my maillog for another reason and noticed the error below.
>SpamAssassin appears to be working properly in spite of the error, but I'm
>not sure what problems might be inherent in the problem.  My bayes data is
>in /var/.spamassassin, owner and group root, permissions 755.  Should these
>be different, e.g. spamd be the owner/group??  Thanks any specific help and
>insights!  I don't really understand the lock files at all.  Here are the
>pertinent log entries:


If you're forcing a global bayes database in local.cf you must set up one 
of two secenarios:

The first scenario ensures everyone can read/write/delete and create files 
in the directory and that it doesn't matter who owns them:

         1) the permissions of the directory MUST be 777.  (yes, that's 
WORLD write).

         2) your bayes_file_mod MUST be 666

The alternative is to force all spamassassin processes, including spamd, 
sa-learn, spamassassin, etc, to only ever execute as one user, and make 
everything owned by that user. If any SA process is ever executed as any 
other user, the bayes file ownership can get badly hosed.

Of course, if you're going to only ever execute as one user, one quickly 
questions the value of forcing the path somewhere on a global basis. You 
can always create a "spamd" user, and set it's home directory to be 
/var/something if you really need it to be on your /var mount point.

Note: spamd strongly dislikes retaining root permissions, and will quickly 
set itself to "nobody" if it finds it's running as root. Use -u to force it 
to go to a particular user if "nobody" isn't your designated runner.