[Samba] removing a file lock

David Mendenhall dmenden at wested.org
Mon Jan 10 23:46:05 GMT 2005


Can anyone tell me whether manually unlocking a file is possible? From 
the lack of response, I'd say no, but I thought I'd ask once more before 
giving up on the idea. Someone suggested killing the process that holds 
the lock, but I'd prefer to not disconnect the user. Any insight is 
appreciated. Thanks.

-david

David Mendenhall wrote:

> Hi all,
>
> I'm trying to find a way to remove a file lock. I haven't found any 
> method using the smb tools. I'm assuming I could remove the file lock 
> by deleting the entry in the locking.tbd file, but the keys are stored 
> as binary, so I can't figure out a way to give tdbtool a proper key 
> name to delete the entry. Anyone know how to remove a file lock? We're 
> using samba version 3.0.10.
>
> The reason I'm looking into this is that when saving a file using a 
> Mac's smb client, it creates a "dot underscore" resource fork file, 
> but doesn't unlock this resource fork when it unlocks the data file. 
> The result is that other Macs can save the data file, but not the 
> resource file, causing all kinds of strange behavior. I've seen 
> mention of this problem on this list, but the only solution I've seen 
> has been to buy Thursby's Mac client, which is cost prohibitive for 
> us. As a hack, I hope was hoping to routinely parse the locking.tdb 
> and delete any orphaned ._ file locks. Not the best solution, but it 
> should get us by if we can't get a fix from Apple.
>
> Any help would be appreciated.
>
> -dmenden



More information about the samba mailing list