Bug 507781 - Can't write file more than once to cifs mount
Can't write file more than once to cifs mount
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Simo Sorce
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-06-24 04:17 EDT by Stephen Childs
Modified: 2009-11-20 06:25 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-11-20 06:25:15 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Stephen Childs 2009-06-24 04:17:35 EDT
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

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

[root@frascati ~]# uname -r

How reproducible:

Steps to Reproduce:
1. Copy a file to the mounted location
2. Try and copy the same file again
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 08:38:28 EDT
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 08:58:15 EDT
Created attachment 349232 [details]
wireshark dump of failed cifs operation
Comment 3 Stephen Childs 2009-06-24 09:00:56 EDT
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 09:18:03 EDT
Seem either a server misconfiguration or a server bug.
I need server logs and configuration to tell.
Comment 5 Jeff Layton 2009-06-24 09:18:03 EDT
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 09:47:36 EDT
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 09:03:21 EDT
I can reproduce the problem with a Fedora 11 client:

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

The server is a D-Link DNS-323 NAS device:
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 09:18:28 EDT
The DNS-323 device indeed runs an older version of Samba:

# smbclient -L //
Domain=[DPO] OS=[Unix] Server=[Samba 3.0.24]
Comment 9 Bug Zapper 2009-11-18 07:07:18 EST
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: 
Comment 10 Dimitri Papadopoulos 2009-11-18 16:02:30 EST
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 01:58:12 EST
I can reproduce the problem with a Fedora 12 client:

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

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 06:25:15 EST
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.