GNOME Bugzilla – Bug 515960
No data available error when the filename already exists (LanDrive)
Last modified: 2014-05-31 20:02:33 UTC
When copying an already existing file to a smb location an No data available error is displayed, using nautilus 2.21.90 or gvfs-copy 0.1.7
Do you still get this with current versions? I get the correct error dialog (A file named "custom-printf.c" already exists. Do you want to replace it?).
We debugged this, the core cause for this is that the libsmbclient create() call doesn't correctly give an EEXIST error when the O_EXCL flag is used and the file already exists. This works on samba and windows xp shares, but the apparently it fails for a LanDrive: http://www.mediacase.co.uk/ This is somewhat similar to bug 515963
Sebastien: Can you get a tcp dump against the landrive when you run the create program. Something like "tcpdump -s0 -w dumpfile.cap -i eth0"
Created attachment 105349 [details] create test log The log has been made using wireshark, that should be compatible with what tcpdump is doing
<simo> alex, the Open and X response from that thing, seem messed up <simo> it returns an 0x00500001 NT status error <simo> which makes no sense <simo> (status errors are always 0x0c00... <simo> at least for this stuff <alex> i had a short look at it with wireshark <simo> alex, unless the guy is not captuing the full packet <alex> and as much as i could understand the sent request had "error if file already exists" set <simo> alex, yeah but the packet returned by the filer is half-broken <simo> that's probably why libsmbclient can't correctly decipher it <simo> it's an appliance problem <simo> maybe windows replies something sensible here <simo> alex, ask this guy to see what happens if he uses smbclient from the CLI <alex> simo: how do you get that to do an exclusive open? <simo> se Fail if exist flag? <alex> yeah <simo> though libsmbclient ? <alex> from the smbclient CLI <simo> hmmm good question <simo> not sure you can indeed
smbc has a similar issue, when trying to upload a different file with the same name it doesn't prompt about the overwrite and doesn't copy anything
Created attachment 105520 [details] wireshark log when running smbc and trying to upload
Same issue there. The open request reply is: NT Status: Unknown (0x00500001) Whereas on a test i did vs a samba server its correct: NT Status: STATUS_SUCCESS (0x00000000) That server seems quite nasty...
Here's a repository of firmware updates that might help on the LanDrive side. Maybe it's been fixed there? Unless this is too little too late :-)
If this is still a problem, it should be worked around in libsmbclient.