SOLVED SMB copy problem - Item not found

arrowd

Dabbler
Joined
Jul 12, 2019
Messages
16
I have two TrueNAS Core 13.0-U6.1 systems with the same datasets and SMB access from my Windows 10 22H2 PC. I want to synch the data from one ("S") to the second ("D"). I've been using Karen's Replicator as I have been using it for eons. After running it the log file shows many files not copied with 'Error 5 - Access is denied'.

(As an example in the rest of these comments, I'll use a text file with a simple short file name.) If I try to copy the file through File Explorer, I get an error popup saying "Item Not Found - Could not find this item - This is no longer located in ... Verify the item's location and try again". The file is certainly there as I can type the file and verify its contents.

I can copy the file to another device but get the same error when trying to copy it to the proper folder in D.

I can copy it to another folder in D with no error. I can then move the file from that folder to the proper folder with no error.

I have looked at permissions, advanced permissions, etc. and see the same file owner and permission details for the file that won't copy as well as a file that did copy.

I looked at permissions on the S and D folders and they are identical.

I tried to delete the folder on D but after deleting the files inside it won't delete the folder itself - same Item not found error message. Copying the folder contents from A to the now empty D results in all files copied except for the ones that had problems the first time.

If I rename the file on S, I can copy the file and I can rename it back to the original name. I then deleted that file from D and find that I can now copy the file from S without error.

I tried renaming the folder on D, but I couldn't copy the file then or after renaming the folder back to the original.

All the files with problems seem to be in a date range of 8/2023 through 10/2023. I don't remember any remarkable event during this period.

I'm totally stumped. I could probably delete everything on D and copy everything back from S, but I'd like to find out the source of this problem in case it recurs. Thanks for any suggestions.
 

arrowd

Dabbler
Joined
Jul 12, 2019
Messages
16
An update: I had been looking at permissions etc. only from my Windows PC. I SSHed into both S and D with PuTTY to look from TrueNAS's viewpoint. The files that didn't copy were already there! But they had root as owner instead of the correct user name. I did a recursive chown from the start of the dataset, and now all is well.

I think what was happening was that when syncing through Windows, a file was seen on S and checked for on D. Windows couldn't see it on D because it didn't have access since root was the owner and not the current user which had no access as an 'other'. Windows then tried to copy the 'missing' file but that wasn't allowed because it couldn't save a file with the same name in the same place. Windows wasn't given enough information to compose a better error message and so it showed what it thought was reasonable.

I have no idea why the owner became root when the files were originally copied to D during that two-month period last fall. I hope this might help someone else in the future.
 
Top