Windows PC copy a folder from FreeNAS/CIFS and got "Invalid MS DOS Function"

Status
Not open for further replies.
Joined
Aug 30, 2014
Messages
6
Hello,

I never see this before. I can delete, rename, list, add new files and folders but when I try copy THIS folder from a FreeNAS CIFS share, I got "Invalid MS-DOS Function" (see image), transference fail. No problem with copy the files inside the folder.
Freenas Error - Img02.png


FreeNAS 9.2.1.7
CIFS share with follow no default options:
Local Master: uncheck (we have a Windows AD Server in network, but FreeNAS use local users in CIFS)
Time Server for Domain: uncheck (cause Windows AD Server)
File mask: 0660
Directory mask: 0770
Unix Extensions: unckeck (we have some Macs in network using this CIFS share)

I list the permission of directories ("ls -lh" and "getfacl", image 01) and is the same of others folders with no problem.

Freenas Error - Img01.png


Should I try the parameter "store dos attribute = no" ?
Any idea?

Thank's and sorry for poor english!
 
Joined
Aug 30, 2014
Messages
6
Well,

I try the parameter "store dos attribute = no" and works! No more "Invalid MS-DOS Function" warning.
Can I have some problem using this option?
 
D

dlavigne

Guest
That option is deprecated, so having it set to yes may have been the issue. Glad to hear it is working now.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
The samba wiki states the following:
The following is only required on Domain Member Servers and not on Domain Controllers!
Add the following to your [global] section of your smb.conf:
vfs objects = acl_xattr
map acl inherit = Yes
store dos attributes = Yes
This options are required on Member Servers, to enable the possibility for real windows ACLs. Domain Controllers have ACL support enabled globally by default!

It is somewhat unclear what they mean by "the possibility for real windows ACLs". From what I understand "store dos attributes=yes" is used as an alternative to "map (archive|hidden|readonly|system)" parameters, which do not work right under ZFS with NFSv4 ACLs.

I am also curious about what the errata means by stating that "store dos attributes" has been deprecated in Samba4.

I am really curious about what the effect is of setting "store dos attributes=no" in an AD enviroment. Please let us know how your server works after the change / what -if anything- breaks.

I am also curious about why the error appeared in the first place. Can you post your smb4.conf file?
 
Last edited:
Joined
Aug 30, 2014
Messages
6
Ok, let's go:

In network we have one Windows 2008 Server with Active Directory working, but only Windows hosts (~5 computers) are in AD. Linux host (2 computers), Mac hosts (4 computers) and FreeNAS (1 computer) aren't on Active Directory.

I received the message "Invalid MS-DOS Function" on Windows 2008 Server when I tried copy a folder from NAS to any place. Don't tested on others hosts.

After used parameter "store dos attributes=no" issue is over.

smb4.conf above (only global and first share, all shares have same configs.):

[global]
server max protocol = SMB2
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 11070
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = Yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
hostname lookups = yes
unix extensions = no
acl allow execute always = true
idmap config *:backend = tdb
idmap config *:range = 90000000-100000000
server role = standalone
netbios name = FREENAS
workgroup = WORKGROUP
security = user
pid directory = /var/run/samba
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
create mask = 0660
directory mask = 0770
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1
store dos attributes = no

[*****]
path = /mnt/****/*****
printable = no
veto files = /.snap/.windows/.zfs/
writeable = yes
browseable = yes
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
vfs objects = zfsacl streams_xattr aio_pthread
hide dot files = yes
guest ok = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = yes
zfsacl:acesort = dontcare


Thank you and at your disposal for any additional information.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Okay, the above indicates that your server is a stand-alone server and not an AD member server. More explanation of Dos File Permissions / Attributes can be found here: http://oreilly.com/openbook/samba/book/ch05_03.html

With "store dos attributes = no" set in your smb4.conf file your FreeNAS box won't be able to handle "Read-Only | Archive | System | Hidden" attributes properly. Whether you need them depends on your use case. I know some backup software utilizes the "Archive" attribute in case other methods of tracking backups fails. I think it is probably still worth checking from another workstation to eliminate an underlying configuration or hardware issue on your DC.
 
Joined
Aug 30, 2014
Messages
6
Ok , when I remove "store dos attributes = no":

- Windows 7 host , same error;
- Mac host, folder copied without any message;
- Unfortunately I can't test in Linux hosts for now.

At your disposal.
 
Status
Not open for further replies.
Top