[Samba] Samba access of FAT32 mounted file system on FreeBSD

Josh Finlay josh at finlay.id.au
Sat Jun 19 19:08:12 MDT 2010


Hi,

Firstly background - 

FreeNAS 0.7.2 (FreeBSD 7.3-RELEASE-p1) 
Samba 3.5.3
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.

This is my entire config file, skip over what is irrelevant. At this stage
I'm lost and thinking it could be the smallest of mistakes:

============
= smb.conf =
============

[global]
encrypt passwords = yes
netbios name = nas
workgroup = WORKGROUP
server string = nas.lan.jcom.net.au
security = share
dns proxy = no
# Settings to enhance performance:
use sendfile = yes
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=64240
SO_RCVBUF=64240
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = yes
time server = no
guest account = root
display charset = LOCALE
max log size = 10
syslog only = no
syslog = 10
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 10
dos charset = CP437
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = smbpasswd
create mask = 0666
directory mask = 0777
force user = ftp
force group = ftp
aio read size = 1
aio write size = 1
log file = /var/log/samba.log
log level = 3

[Movies]
comment = 500GB NTFS movie storage
path = /mnt/noontec-movies/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = yes
inherit permissions = yes
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700

[Storage]
comment = 500GB FAT file storage
path = /mnt/noontec/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = yes
inherit permissions = yes
vfs objects = recycle
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700

=======
= eof =
=======

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 at 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 at 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: \>


This has absolutely got me stumped. I've tried and googled for everything
I can think of but to no avail. I've tried in the IRC channel on freenode
but I think it could be a time zone conflict as there wasn't really anyone
active.

Part of me is conflicted on whether this is a Samba issue or a FreeBSD
issue, but considering I have complete functional access (even for the
lowest permission user) to the mount and yet Samba fails to function - I'm
beginning to become convinced it is a Samba issue.

Any advice on this would be greatly appreciated, as I am out of ideas.

Kindest Regards,

Josh Finlay


More information about the samba mailing list