Getting "Item not found" error even when file exists on TrueNAS

NotMrSavvy

Cadet
Joined
Jul 7, 2021
Messages
5
Hey everyone, I'm running into a bit of a weird error and could use some assistance. I recently deployed my first TrueNAS Core system, which is currently in use for testing purposes. I'm working in a mixed macOS/Windows environment, with more of our users on Macs than Windows PCs. Most of our Mac users are running macOS Big Sur 11.4, (the current version as of this writing,) while our Windows users are on Windows 10 20H2. Recently I attempted to transfer some files from one of our older Macs running macOS 10.12 "Sierra" to one of our Windows systems via our TrueNAS Server. TrueNAS took the files without a problem and everything appeared to be fine. I did a bit level comparison of the data between the TrueNAS Server and the older Mac using Beyond Compare 4's current version, and everything checked out.

When I attempted to pull the files down on one of our Windows machines however to compare with some data on that system's local drive, I was greeted with an error message that read "Item not found," with a little bit of detail about the file that Windows claimed was missing. (I'm including a screenshot of an example of the error that I'm getting as part of this message.) At first I thought that maybe there was an actual issue with the files, so I copied them to our TrueNAS system again, ran the same comparison in Beyond Compare, and wound up with the exact same results. Everything looked fine on the Mac and the TrueNAS server, but the Windows machine was throwing up the same error message. I jumped on one of our newest Macs running macOS 11.4, logged into TrueNAS, and pulled the files down on that system just to be absolutely positive that there was no real issue with the files. Once again I ran a Beyond Compare bit level comparison and everything checked out. I also opened the file that Windows claimed wasn't found on the server. I then went over to another Windows system to be sure that the one Windows machine I was using wasn't the culprit, and a second Windows system gave me the same error.

What I ultimately wound up doing was moving the file that Windows wasn't recognizing up one level in the directory structure, and copying the files to the Windows machine again. This time the transfer worked, only giving me the same error for one of Apple's *.DS_Store files which I didn't need to copy anyway, so I just skipped that file completing the transfer. Again, I ran a comparison with Beyond Compare, and all of my files were intact.

Initially I thought I might have hit Microsoft's 255 character limit for File Explorer, primarily because Beyond Compare could still see that the file was where it should have been before I intentionally moved it one level higher in the directory structure, and because the Mac had no issue copying the file either. On the PC, I dragged the file back to the sub-folder I originally had it in on the Mac and the TrueNAS Server, and Windows had no problem with me moving it to that location though, which suggests that it might not be a character limit as I initially thought. Just to be thorough, I also threw the entire file path into Microsoft Word and did a character count on it, which came out to roughly 155 characters, giving me almost 100 to spare before I would hit a character limit.

Does anyone have any idea what might be causing this issue when copying files from the Server to Windows? It looks like a character limit issue, but I'm not hitting the character limit in Windows. Long file paths are turned on, and this issue is not occurring on non-Windows systems.
TrueNAS Error.png
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
"No longer located in"...

That seems to be saying it had been able to find it there at some point.

Permissions?
 

NotMrSavvy

Cadet
Joined
Jul 7, 2021
Messages
5
Thank you for your reply sretalla, I appreciate it very much. Based on what you mentioned, I actually went and double-checked my permissions again. According to Windows I'm logged in with Full Control on TrueNAS (including Read/Write access,) and none of the permissions in Windows itself appear to be out of the ordinary.

I forgot to mention this in my initial message, but I also tried to copy the files to Windows using Beyond Compare's copying feature as I know it's capable of bypassing the 255 character limit in the Windows 10 File Explorer. While Beyond Compare had no issue scanning the files, including after I moved them up one level in the directory structure, and back into their proper location, when it tried to copy them, it too gave me an error message under Windows similar to the one from File Explorer. After reading your message about permissions possibly being the culprit, and not finding anything that should prohibit read and copy operations on Windows, I jumped over to one of the Macs again, logged into TrueNAS and examined my permissions there again. As with Windows, everything appeared fine. Still curious though, I opened Beyond Compare on the Mac and use its copying capabilities rather than those of the macOS Finder to copy the files over just to see if I could trigger the error I received under Windows. Once again the copy on the Mac ran flawlessly just as it did under Finder.

I'm once again at a loss, it looks like I have full control including read and write access to everything in this share (as I should,) and doesn't look like an permissions are incorrect.
 

NotMrSavvy

Cadet
Joined
Jul 7, 2021
Messages
5
Update: This issue has been solved! For anyone else who runs into this maddening situation, here's what was happening as well as the workaround that fixed the issue for me.

The issue: "Special" character conflicts between TrueNAS, Windows, and macOS. If you look at the screenshot in my original post, you'll note that the directory path includes a folder that appears to be named Scripts•StoryBoard, which is actually the source of our problem. This folder was originally created on a Mac at a time when anyone accessing our filing structure would have been using a Mac. While we're still primarily a Mac-based organization, we now have some Windows users as well, hence how we ran into this issue. On the Mac, that folder is actually named Scripts/StoryBoard, because Macs treat a forward slash in the middle of a file or folder name like any other text. Copying this folder from one Mac to another, whether it's via TrueNAS, an external hard drive formatted as HFS+, APFS, ExFAT, or even FAT32 won't result in an error of any kind. Copying this folder from a Mac to a Windows PC usually doesn't result in an error either. Using an ExFAT or FAT32 formatted drive, (3.5" HDD, 2.5" SSD, USB stick, it doesn't matter,) the files will copy just fine, but Windows will replace the forward slash with a character that looks like a question mark inside of a box. Apparently TrueNAS handles this differently and under Windows, interprets the character as that circle thing in the screenshot instead of the "question mark inside of a box" character that's used when directly transferring data via an external ExFAT/FAT32 formatted drive.

The solution: Simply changing the forward slash to a dash fixes the issue. On the Windows side of things it's entirely possible to change the circle character to a dash as well, which resolves the issue, allowing the files to be copied.

Is there any additional documentation or reference to this or similar issues on the TrueNAS community? I know "special" characters can vary between systems and using them in file names is discouraged in general precisely because of issues such as this one, but I would be curious about other potential problem characters that I need to keep an eye out for in the future.
 
Top