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

Michael Heydon michaelh at jaswin.com.au
Mon Jul 28 00:29:29 GMT 2008

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.

*Michael Heydon - IT Administrator *
michaelh at jaswin.com.au <mailto:michaelh at jaswin.com.au>

More information about the samba mailing list