Bug 507781 - Can't write file more than once to cifs mount
Summary: Can't write file more than once to cifs mount
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: 10
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Simo Sorce
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-24 08:17 UTC by Stephen Childs
Modified: 2009-11-20 11:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-20 11:25:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
wireshark dump of failed cifs operation (1.60 KB, application/octet-stream)
2009-06-24 12:58 UTC, Stephen Childs
no flags Details

Description Stephen Childs 2009-06-24 08:17:35 UTC
Description of problem:

When I mount a directory from a samba server using cifs, I can only write a file once to that location: subsequent writes give an error as below. It is easily reproducible:

[root@frascati ~]# mount |grep wilde
//wilde/childss on /home/childss/wilde type cifs (rw,mand)

[childss@frascati ~]$ cp /etc/group ~/wilde/cp_test1
[childss@frascati ~]$ cp /etc/group ~/wilde/cp_test1
cp: cannot create regular file `/home/childss/wilde/cp_test1': No such file or directory

/var/log/messages has this:

Jun 24 09:14:29 frascati kernel: Status code returned 0xc0000034 NT_STATUS_OBJEC
T_NAME_NOT_FOUND

Version-Release number of selected component (if applicable):
[root@frascati ~]# rpm -qf `which /sbin/mount.cifs`
samba-client-3.2.11-0.30.fc10.x86_64

[root@frascati ~]# uname -r
2.6.27.24-170.2.68.fc10.x86_64

How reproducible:


Steps to Reproduce:
1. Copy a file to the mounted location
2. Try and copy the same file again
3.
  
Actual results:
File should be copied.

Expected results:
Error like this:
cp: cannot create regular file `filename': No such file or directory


Additional info:

Comment 1 Simo Sorce 2009-06-24 12:38:28 UTC
We need some more info to understand where is the problem.
Can you provide a log level 10 of your server and a network trace ?

Comment 2 Stephen Childs 2009-06-24 12:58:15 UTC
Created attachment 349232 [details]
wireshark dump of failed cifs operation

Comment 3 Stephen Childs 2009-06-24 13:00:56 UTC
Sorry I don't have access to the server logs. I have attached a wireshark network trace. Also the server version is as follows:

[childss@frascati ~]$ smbclient -L //wilde|head -n 1
Enter childss's password: 
Domain=[COMPSCI] OS=[Unix] Server=[Samba 3.0.23b]

Also access via nautilus is OK - it is just when mounting via cifs that the problem occurs.

Comment 4 Simo Sorce 2009-06-24 13:18:03 UTC
Seem either a server misconfiguration or a server bug.
I need server logs and configuration to tell.

Comment 5 Jeff Layton 2009-06-24 13:18:03 UTC
This looks like a server problem. The capture shows a QueryPathInfo call for the path which is successful. It then tries to SetFileInfo for the same path (to truncate the file), and that fails with the STATUS_OBJECT_NAME_NOT_FOUND error.

I suspect this is a bug that has already been fixed. 3.0.23 is pretty old. You may want to consider upgrading samba on the server to something newer.

Comment 6 Simo Sorce 2009-06-24 13:47:36 UTC
Indeed it would be nice to see if you can reproduce against 3.0.33, 3.2.11 or 3.3.5

Comment 7 Dimitri Papadopoulos 2009-07-12 13:03:21 UTC
I can reproduce the problem with a Fedora 11 client:

# mount | grep dimitri
//192.168.1.3/dimitri on /nas/dimitri type cifs (rw,mand,noexec,nosuid,nodev)
#  
# cat > FOO.txt
11111
# cp FOO.txt /nas/dimitri/
# cat /nas/dimitri/FOO.txt 
11111
# 
# cat > FOO.txt
22222
# cp FOO.txt /nas/dimitri/
cp: cannot create regular file `/nas/dimitri/FOO.txt': No such file or directory
# cat /nas/dimitri/FOO.txt 
11111
# 


The server is a D-Link DNS-323 NAS device:
http://www.dlink.com/products/?pid=509&tab=1
The firmware is up-to-date (version 1.07) so it cannot be upgraded.
The DNS-323 is running some sort of Linux but I don't know which version of Samba it ships with.

Note that I also have other problems with CIFS - see Bug 492615.

Comment 8 Dimitri Papadopoulos 2009-07-12 13:18:28 UTC
The DNS-323 device indeed runs an older version of Samba:

# smbclient -L //192.168.1.3
Domain=[DPO] OS=[Unix] Server=[Samba 3.0.24]
[...]

Comment 9 Bug Zapper 2009-11-18 12:07:18 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Dimitri Papadopoulos 2009-11-18 21:02:30 UTC
Please bump version from 10 to 11 and do not close.
This can be reproduced with Fedora 11 too.
Will test Fedora 12 soon.

Comment 11 Dimitri Papadopoulos 2009-11-20 06:58:12 UTC
I can reproduce the problem with a Fedora 12 client:

# mount | grep dimitri
//192.168.1.3/dimitri on /nas/dimitri type cifs (rw,mand,noexec,nosuid,nodev)
#  
# cat > FOO.txt
11111
# cp FOO.txt /nas/dimitri/
# cat /nas/dimitri/FOO.txt 
11111
# 
# cat > FOO.txt
22222
# cp FOO.txt /nas/dimitri/
cp: cannot create regular file `/nas/dimitri/FOO.txt': No such file or
directory
# cat /nas/dimitri/FOO.txt 
11111
# 

Again the server cannot be upgraded in my case, it's a DNS-323 device with up to date firmware running Linux + Samba 3.0.24.

Comment 12 Jeff Layton 2009-11-20 11:25:15 UTC
Again, this is not a client-side problem. The server is simply broken here. We can't fix that in the client. I suggest filing a bug with D-link and asking them to fix this.


Note You need to log in before you can comment on or make changes to this bug.