[Samba] Rename to open file doesn't work, why?

Wilhelm Meier wilhelm.meier at fh-kl.de
Mon Jul 28 05:02:52 GMT 2008


Am Montag, 28. Juli 2008 schrieb Michael Heydon:
> Wilhelm Meier wrote:
> > <snip>
> > On a local linux filesystem like ext2/3 one can rename a file to
> > an existing, already open file.
> >
> > But this doesn't  work on a cifs-mounted samba-share
> > <snip>
>
> The reason this works with ext2 is that as long as you hold an open
> file descriptor a deleted file is still accessible (rename is
> essentially a delete and then a move).
>
> While it might be theoretically possible for this to work unix to
> unix, Windows doesn't deal with deleted files the same way (it
> prevents you from deleting files as long as they are open), and so
> it's quite possible that SMB/CIFS doesn't understand the concept of
> having a deleted file open.

Yes, with a windows file server this is impossible. 

But I thought the samba unix extensions should make that possible.

Otherwise samba/cifs is unusable as e.g. user-homes, since KDE tends 
to use this pattern.

Is there any workaround at the moment?

-- 
Wilhelm


More information about the samba mailing list