Virus scanner lock file not removed

Julian Field mailscanner at ecs.soton.ac.uk
Fri Apr 4 16:25:47 IST 2003


The file is created but it never needs to be deleted. When the autoupdate
script does its job, it locks the file with an exclusive lock, does the
update, then unlocks it again.

MailScanner processes always lock the file with a "shared" lock when they
want to use the scanner. Lots of "shared" locks can be used on a file at
the same time (in this case, one per MailScanner child process), but only 1
"exclusive" lock can be held at a time, and that stops any "shared" locks
as well (which is what the autoupdate script uses).

So it's not the presence of the file that is stopping MailScanner running,
it's something else.

I use Sophos myself and have never had a problem of this sort, so I'm not
quite sure what is going wrong...

At 16:19 04/04/2003, you wrote:
>Thanks for the suggestion, Jason, but the file seems to have the right
>permissions, as we run our Exim as user exim, group exim:
>
>$ ls -l /tmp/SophosBusy.lock
>-rw-------    1 exim     exim           94 Apr  4 16:01 \
>/tmp/SophosBusy.lock
>
>The file contains
>         Locked for updating Sophos IDE files by 1389
>         Unlocked after updating Sophos IDE files by 1389
>as written by /usr/lib/MailScanner/sophos-autoupdate, where 1389
>corresponds with a pid logged to /var/mail/maillog:
>
>Apr  4 16:01:00 elgar update.virus.scanners: Found sophos installed
>Apr  4 16:01:00 elgar update.virus.scanners: Updating sophos
>Apr  4 16:01:01 elgar Sophos-autoupdate[1389]: Sophos successfully
>updated in /usr/local/Sophos/366.200304041601
>
>If I do nothing, the file's access time and contents change each time
>the update runs at 1 min past the hour but the presence of the file
>stops MailScanner from processing any mail waiting to be scanned. In the
>sophos-autoupdate script, the LockSophos subroutine creates the file and
>locks it and the UnlockSophos routine unlocks and closes it, but
>shouldn't it unlink it as well?
>
>David
>
>On Fri, 2003-04-04 at 15:22, Desai, Jason wrote:
> > Check the ownership and permissions of the lock file.  Perhaps you have
> > virus update script running as root create the file, but MailScanner
> > (running as user mail for Exim maybe) tries to lock the file but does not
> > have permission?
> >
> > If this is the case, instead of deleting the file, try changing the
> owner of
> > it to mail, or whoever you run MailScanner as.
>
>--
>David Osborne <david.osborne at nottingham.ac.uk>
>Information Services, University of Nottingham

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support



More information about the MailScanner mailing list