#782 Samba failing to list files on FAT32 mount

v0.7x
closed
nobody
5
2015-01-12
2010-06-20
Anonymous
No

FreeNAS 0.7.2
1TB disk, 500GB FAT32 (/dev/da1s1) + 500GB NTFS (/dev/da1s4)

Just to clear it up, I'm using FAT32 and NTFS because this is actually a
media center box that functions as an external HDD when plugged into USB.
I'm using it as a storage device because its quite large a disk, but may
from time to time use it as a media center so I need to keep the disk in a
format that it likes for that.

I've configured both the FAT32 and the NTFS slices exactly the same in
smb.conf and the NTFS slice works great, but the FAT32 will mount but no
access to files or even a list of files.

My mounts look like this:

/dev/fuse0 on /mnt/noontec-movies (fusefs, local, synchronous)
/dev/da1s1 on /mnt/noontec (msdosfs, local)

(fuse0 due to the ntfs)

I've tried every which way to mount the FAT32 disk, including:

mount_msdosfs -o large=yes,longnames=yes,nowin95=yes -u root -g wheel -m
777 /dev/da1s1 /mnt/noontec
mount_msdosfs -o large=yes,longnames=yes,nowin95=yes -u nobody -g nobody
-m 777 /dev/da1s1 /mnt/noontec

With all the options, with just defaults, etc etc etc. They all work as
expected on the machine, full read/write access however Samba fails to read
from it.

After some config tweaking I've got Samba to give me at least something to
describe an error:

[2010/06/20 10:07:35.431133, 1] smbd/vfs.c:932(check_reduced_name)
check_reduced_name: couldn't get realpath for *
[2010/06/20 10:07:35.433036, 3] smbd/filename.c:1181(filename_convert)
filename_convert: check_name failed for name * with
NT_STATUS_INVALID_PARAMETER
[2010/06/20 10:07:35.434894, 3] smbd/error.c:80(error_packet_set) error
packet at smbd/trans2.c(2290) cmd=50 (SMBtrans2)
NT_STATUS_INVALID_PARAMETER

When attempting to access the share (ie. smbclient) I get this
information:

root@pharaoh:#> smbclient //192.168.0.10/Storage
Enter root's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.3]
Server not using user level security and no password supplied.
smb: > ls
NT_STATUS_INVALID_PARAMETER listing *

            59574 blocks of size 8388608. 35667 blocks available

smb: >

When trying to access the NTFS share:

root@pharaoh:#> smbclient //192.168.0.10/Movies
Enter root's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.3]
Server not using user level security and no password supplied.
smb: > ls
. D 0 Sun Jun 20 20:27:32 2010
.. D 0 Sun Jun 20 19:55:18 2010
$RECYCLE.BIN D 0 Sun Jun 13 02:16:54 2010
Files D 0 Sun Jun 20 06:47:49 2010
More Files D 0 Sun Jun 20 00:51:08 2010
Even More files D 0 Sun Jun 20 06:47:49 2010

            59604 blocks of size 8388608. 49286 blocks available

smb: >

To confirm:
- FAT32 partition mounted fine, and able to read/write to it
- NTFS as above, works perfectly with Samba
- FAT32 does not list any files ...HOWEVER:

I've come to realise that the issue is only its ability to list the files in the share.

If I specify a file directly it will still work!

See below:

root@pharaoh:/var/log/munin> smbclient //192.168.0.10/Storage
Enter root's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.5.3]
Server not using user level security and no password supplied.
smb: > cd Downloads
smb: \Downloads> cd Pharaoh
smb: \Downloads\Pharaoh> cd Files
smb: \Downloads\Pharaoh\Files> ls
NT_STATUS_INVALID_PARAMETER listing \Downloads\Pharaoh\Files*

            59574 blocks of size 8388608. 35667 blocks available

smb: \Downloads\Pharaoh\Files> get update-cm-4.2.15.1-signed.zip
getting file \Downloads\Pharaoh\Files\update-cm-4.2.15.1-signed.zip of
size 39955373 as update-cm-4.2.15.1-signed.zip (6339.4 KiloBytes/sec)
(average 6339.4 KiloBytes/sec)

Notice that a "ls" fails, I also tested by specifying a non-existent
directory and it fails with a notice that it doesnt exist, which is good.
Samba IS able to access the files on the mount, just for some reason won't
display a file list?!

The file received was good, came in fully intact and complete.

I plugged this same disk into my ubuntu server, used basically the same config (except ubuntu was samba 3.4.x not 3.5.3 as in this case) and it worked perfectly.

Also note I am using FreeNAS 0.7.2 as 0.7.1 would not boot for some reason.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-06-22

    Assistance?

    I'd like to try an alternative Samba release, however I do not have the required build environment to build it from source.

    if a developed could provide a binary package of a different (older or nightly) for me to try, that would be very helpful.

     
  • zoon01

    zoon01 - 2010-06-23

    Bug is correct and Samba related only on fat 32 drives.
    with Samba 3.0.37 the problem does not exist not FreeBSD or FreeNAS related.
    I believe you did forward the bug to Samba.
    Thanks for that.

    Regards,
    Michael Zoon

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks