Latest working kernel version: 2.6.22 Distribution: debian stable/testing Hardware Environment: several p4,dual core, quad core, vmware Problem Description: Impossible write on file when it is mouted by cifs fs - I can create a file, delete the file, rename the file but I can't write or append on it. Steps to reproduce: mount -t cifs //ip_server/test0 /local/test0 -o "username=xxx,password=xxx" or using smbmount, mount.cifs and other from client: touch /local/test0/filetest touch: setting times of `local/test0/filetest': Invalid argument I also tried from a client (before I umounted all share) echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled mount -t cifs //ip_server/test0 /local/test0 echo 1 > /proc/fs/cifs/LinuxExtensionsEnabled (read in ML of samba) I tried on the samba server use: create mask = 0777, directory mask = 0777, unix extensions = yes (or later) no, acl support = no (or) yes permission of share on the server are: rwxrwxrwx But: with konqueror using smb://ip_server/test0 everything is ok With apple client, windows client everything is ok. I suppose that the problem is in cifs module, because if I use smbfs to mount remote share everything is ok. Please tell me if you need other info. Thanks Pol
With last kernel (2.6.27.9) same problem. Pol
Hmm, I had the same problem some time ago. Posted that on the cifs developer list. In my case it is a bug in the samba server, which does not work correcly with dls. It only concerns the version in etch. Sid already has a fixed samba server. The workaround is to disable dls in the client. There is a patch in the developer list flying around. There is no problem with windows clients as they apparently don't use dls. I will attach the patch. Maybe it helps. Cheers, Michael P.S.: The patch will be in the 2.6.28 kernel I was told.
Created attachment 19400 [details] Adds nodfs option to cifs
Sorry, please replace "dls" with "dfs" in my posting. (I guess I need an xmodhack here :-) ) To use the patch, you need to recompile the kernel with the patch. Furthermore, to show any effect, you need to add the option "nodfs" to your mount options.
Hi and thanks for the reply, so I should recompile more than 30 (different) linux client to resolve the problem?! Is there another way to resolve the problem? Thanks Pol
Is there a patch to 2.6.27.10? I prefer use stable kernel. Thanks. Pol
Can you run a wireshark trace either on the server or client when you issue the command that fails and attach that trace here alongwith the command you used? I assume the server is a samba server and the exported share is part of a local filesytem on the server!
If you believe that this is related to the Samba server DFS path processing bug (for which the relatively new "nodfs" client mount option provides a workaround, by avoiding requesting dfs path support during smb/cifs negotiation), then it can be disabled on the server. The server DFS path processing problem occurred with Samba server versions approximately version 3.0.26, and it was a problem on version 2.6.26 through 2.6.27 Linux kernel cifs client.
Although I doubt that this is the cause of your bug, to turn dfs off on the server can be done by setting "host msdfds = no" in /etc/samba/smb.conf Otherwise to make much progress would require a debug log: 1) dmesg -c (to clear the log) 2) echo 7 > /proc/fs/cifs/cifsFYI (to enable cifs logging) 3) dmesg > debug-data-to-send-in (to save the debug information 4) echo 0 > /proc/fs/cifs/cifsFYI (to turn off logging) and/or a network trace http://wiki.samba.org/index.php/Capture_Packets This will allow us to narrow the problem down.
cifstest6:~ # uname -r 2.6.27.8-1-default cifstest6:~ # mount -t cifs //cifstest8/smb8 /mnt/smb_a -o user=root,pass=password cifstest6:~ # ls -l /mnt/smb_a total 4 -rw-r--r-- 1 root root 16 Feb 18 04:11 f1 cifstest6:~ # vi /mnt/smb_a/f2 cifstest6:~ # touch /mnt/smb_a/f2 cifstest6:~ # touch /mnt/smb_a/f3 Permissons on the share directory on the samba server are 777. If I mount that share as a different user (i.e. -o user=xyz,pass-uvw), I do not see any problem touch'ing existing files as well as new files as long as permissions are right. Certainly no 'setting times, invalid argument' error. If at all, this sounds more like a server issue than a client issue.
Has been fixed (the Samba server problem mentioned above was also fixed).
Which version of samba server includes this fix?
I think the Samba server problem with malformed DFS paths was fixed in Samba 3.0.26 (server) but could also be worked around (with turning off DFS support on the server smb.conf).