"Invalid MS-DOS Function" when moving folders from FreeNAS to Windows 7

Status
Not open for further replies.

billhickok

Dabbler
Joined
Oct 8, 2014
Messages
36
Let me preface this by explaining my situation. I have thousands of folders worth of data to move from external hard drives to my newly built FreeNAS machine. I have successfully set up a CIFS share. My external drives are all formatted using Mac OS X. If I try moving all those folders on the externals using my Windows 7 machine (since i've installed software to recognize Mac formatted drives,) there many files that end up not being transferred due to file names being too long. Because of this, I have resorted to transferring all my files to my FreeNAS machine using my Macbook (I say "resort" as i'm bandwidth limited by it's USB 2.0 ports.) The only problem is that afterwards, when I then try to transfer any of those folders from my FreeNAS machine to my Windows Machine, I get this error message:

8IvDIWl.png


I am however able to transfer the files inside these folders to my Windows Machine. Also, when I transfer folders from my Windows machine to my FreeNAS machine, i'm able to transfer them back to either my Windows or Mac computer with no issue. This leads me to believe the problem is with the directories on my Mac (how the characters are formatted.)

I've googled around and apparently, changing the smb4.conf parameter "store dos attribute = yes" to "store dos attribute = no" may remedy this. I have no idea how to do this (yes i've searched around) and even if I knew, i'm still a bit reluctant as i'm unsure if it will introduce any other issues.

I'm open to any sort of solution...thoughts?
 
Last edited:

billhickok

Dabbler
Joined
Oct 8, 2014
Messages
36
Also would like to say...any solution which involves being able to transfer the data on my Mac formatted drives to my FreeNAS machine using my Windows machine (where I have USB3.0 + gigabit throughput,) is very welcome.
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
You should be able to change the dos attribute parameter directly from the GUI (from the CiFS service tab) without messing from the CLI
 

billhickok

Dabbler
Joined
Oct 8, 2014
Messages
36
Hmm, well I actually did look into the GUI settings and didn't find anything directly pertinent (unless i'm missing something):

il6w03A.png


Don't see a setting below either.

Edit: Oh do I just add that line in Auxiliary parameters?
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Strange, I remember was there in the 9.2.1.x version (or maybe in the CIFS share settings). What version are you using? Btw, sorry but in case is not there either i can't help you. :(
 

billhickok

Dabbler
Joined
Oct 8, 2014
Messages
36
I'm using the latest build (9.3 Stable). Well I added that line in the auxiliary parameter section to test out. Rebooting now to try and see if this works...
 

billhickok

Dabbler
Joined
Oct 8, 2014
Messages
36
Welp...it seems that fixed it. That was pretty simple. :)

I'm hoping that changing that parameter doesn't introduce any issues in the future though.
 

enemy85

Guru
Joined
Jun 10, 2011
Messages
757
Glad you solved
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Welp...it seems that fixed it. That was pretty simple. :)

I'm hoping that changing that parameter doesn't introduce any issues in the future though.
If you're disabling 'store dos attributes' you should also add following auxiliary parameters to you CIFS config:

Code:
map archive = no
map hidden = no
map system = no
map readonly = no

This will prevent samba from trying to manipulate your POSIX permissions bits to try to map DOS attributes (you don't want this behavior).
If you feel particularly ambitious you can unchecked the 'write attributes' ace. This should tell your clients that attributes won't work. It will help identify misbehaving programs. For instance at work a particularly shoddily programmed xp-era cartography program crashes when dos attributes are disabled. When I removed the write attributes ace, it actually produced a meaningful error message about why it was crashing.
 
Status
Not open for further replies.
Top