[Gllug] Samba , Apache and 'Text file busy'

Mike Brodbelt mike at coruscant.demon.co.uk
Thu May 20 23:24:47 UTC 2004


On Thu, 2004-05-20 at 17:29, Amias Channer wrote:
> Hello All ,
>  
> I am editing a cgi script in xemacs via a samba fileshare , this file is also served by apache on the remote box.
> 
> I save the file and apache will not serve it and when i try to run it from the command
> line i get told 'Text file busy' .
> 
> lsof filename tells me that smbd is still using it .
> 
> So i googled for possible answers/explanations , it appears to be a problem that a few people
> are suffering from , sadly nothing cleverer than restart samba was suggested (that worked).

At an educated guess, you're having problems with oplocks. Samba may
well be granting an oplock on the file, and a local Unix process (i.e.
apache) then gets an error when it tries to access the file.

To fix this, you need to either turn oplocks off on the share, or allow
a Samba granted oplock to be broken by a local Unix process. On linux
2.4 and IRIX, there is kernel support for this.

I would start by setting 'oplocks = no' on that share. This will degrade
performance on the share somewhat, but if it fixes the problem you will
know that it is an oplock issue, and can then try to use kernel oplocks,
assuming the OS on the machine in question supports it.

HTH,

Mike.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list