On Thu, Mar 09, 2000 at 10:16:32AM +1100, [EMAIL PROTECTED] wrote:
> Does anyone know how to lock files that have got spurious locks on
> them? I discovered that a reboot will do it. :-(
find the process holding the lock (fuser -v or lsof will do the trick)
and kill it. the kernel will clean up.
(unless its over NFS - everything except trond's newer nfsv3 patches
have a reasonably easy to hit locking bug).
one way to at least work around it, is to just move the file out of
the way:
mv lockedfile lockedfile.bak
cp lockedfile.bak lockedfile
locks follow the inode, not the filename.
ugly, but beats a reboot.
> I suddenly wonder - I was running the unlock program as root; I think
> the /var/spool/mqueue files were also root owned, so that would have
> been right, wouldn't it?
the mail system probably runs sgid mail or something (don't know how
redhat do it), but its the usual story - root should be able to unlock
anything (assuming no remove filesystems are involved).
> Was file locking and unlocking buggy in RH4.2
> (kernl 2.0.32 actually)?
not that i'd heard - and i'd be surprised if it was.. i'm guessing
some qmail/something prog is still running and holding the lock.
> I *plan* to change over to postfix at some stage.
apt-get install postfix
(answer questions)
use postfix
if its any harder than that, that's your own choice ;)
--
- Gus
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text