-   Linux - Server (
-   -   Directory entries truncated in NAS smb share when accessed by FC9 (

dwmorton 08-02-2008 11:20 PM

Directory entries truncated in NAS smb share when accessed by FC9
I have a home network with a combination of FC8 and FC9 machines and a TeraStation Pro NAS. The FC8 and FC9 machines can access each others smb shares with no problems. The FC8 machines can access the NAS smb share with no problems.

I am seeing very strange behavior when FC9 machines try to access the NAS smb share. If I use Nautilus, konqueror, firefox or smbclient, I can access the NAS smb share, but the last character is truncated from each directory entry.

Mounting the NAS smb share using the "mount" command produces the correct result with correct directory entries.

Any ideas on what is going on?

Mr. C. 08-03-2008 01:39 AM

Since you see the problem at the end of strings representing file names, there seesms to be some difference between the way the two systems are interpreting file name string lengths or end of string characters.

Have you checked the vendor's website for know issues or updates, or the Samba mailing lists?

dwmorton 08-03-2008 08:53 AM

I've searched samba bugzilla and redhat bugzilla. No mention of this problem anywhere. Is there a way I can focus this a bit...

What is the difference between accessing a samba share via nautilus/firefox/konqueror using an address line starting with "smb://" and accessing the share via "mount -t cifs"? What packages are involved in each method?

Mr. C. 08-03-2008 11:18 AM

There are two protocols that can be used to access Windows shares: smb and cifs. The later wants to be the preferred method for accessing remote Windows shares.

The smb:// protocol URI component indicates that the SMB protcol is used to access the resources on the server.

The -t cifs mount command option indicates that the CIFS protocol is to be used (instead of SMB). Linux has both cifs and smbfs as kernel file syste modules.

This article will explain why there are two protocols:

dwmorton 08-03-2008 06:21 PM

I learned a great deal from your reference. Armed with this information, I searched redhat bugzilla more intelligently and found that my issue is a reported bug:

There is apparently a patch in the works.

Thank you!

Mr. C. 08-03-2008 06:53 PM

Ah, nice sleuthing!

And indeed, that patch shows it is an off-by-one error during file name character conversion:


        if (dest_len && dest) {
                /* Did we already process the terminating zero ? */
-                if (dest[dest_len-1] != 0) {
-                        dest[dest_len-1] = 0;
+                if (dest[dest_len] != 0) {
+                        dest[dest_len] = 0;

You can apply the patch and rebuild the smbclie if this is affecting you greatly.

All times are GMT -5. The time now is 08:05 AM.