In TrueNAS-13.0.U5.3, I've discovered that the Modified Date and Time is sometimes incorrect for sub-folders after copying to the NAS (using drag-and-drop from Finder on my Mac). Essentially, I'm hitting the same issue as this posting:
www.truenas.com
Since that posting was never marked Solved (and that whole thread is tagged Read-only so I can't reply there), and I couldn't find any other postings on this subject directly related to sub-folder date modified issues, I'm making a new posting.
From that posting: "The result: the parent folder retains the Date Modified, the files retain the Date Modified, but the subfolder containing the files does not. "
I'm hitting this exact issue, even after updating to TrueNAS-13.0.U5.3 CORE. When I moved to TrueNAS-13.0.U5.3 CORE (from TrueNAS-12.0-U8.1), it resolved issues with the Creation date/time and Modified date/time of copied files (no longer changes Birth/Modify = date/time-of-copy), but sub-folders sometimes end up with the wrong Modified date. The top parent folder (the one I drag-and-drop in the Mac Finder into the TrueNAS share) transfers the correct Modified date, but the sub-folders Modify field often picks up the date/time-of-copy. (Creation/Birth date/time seems to work properly in all cases.)
Here is an example:
I have the following folders/files (myfile.mp4 inside SUB_FOLDER inside PARENT_FOLDER):
PARENT_FOLDER/
----> SUB_FOLDER/
----------> myfile.mp4 (5.28GB)
On M1 Mac (MacOS Monterey 12.6.8), here are the stats:
My first test was to drag-and-drop SUB_FOLDER over to TrueNAS, and everything works fine:
Now, the second test was to drag-and-drop the PARENT_FOLDER over to TrueNAS, which is where the problem occurs:
Notice that the Modify time of the SUB_FOLDER is incorrect. It reported the time of the copy (Fri Nov 24 16:41:41 2023), instead of the original Modify time on the Mac (Fri Nov 24 16:34:44 2023). Note that I am able to consistently reproduce this, it's not flaky (for a given folder/file structure).
The same issue applies for sub-folders modified years ago, it will sometimes change the sub-folder Modify value to today's date/time.
The reason I say "sometimes" is that (same as mentioned in the original posting) the problem seems to be sensitive to the size (or number?) of files within the SUB_FOLDER. In my tests above, the myfile.mp4 is a 5.28GB file. If I do the same experiment with a small file (3.1MB), the SUB_FOLDER has the correct Modify time.
Here is my testparm info:
@anodos : are there any SMB attributes I can try or more info I can provide you? Or should I file a support ticket (if one doesn't already exist on this topic)?
Date Modified not being copied on some subfolders (SMB/MacOS)
I've been chasing what seems to be an old bug that pops up in very specific test cases. It took me several days of trial and error to find a way of consistently reproducing this weird behavior. It might be related to the issue in this thread. The issue: When transferring files via SMB on MacOS...

From that posting: "The result: the parent folder retains the Date Modified, the files retain the Date Modified, but the subfolder containing the files does not. "
I'm hitting this exact issue, even after updating to TrueNAS-13.0.U5.3 CORE. When I moved to TrueNAS-13.0.U5.3 CORE (from TrueNAS-12.0-U8.1), it resolved issues with the Creation date/time and Modified date/time of copied files (no longer changes Birth/Modify = date/time-of-copy), but sub-folders sometimes end up with the wrong Modified date. The top parent folder (the one I drag-and-drop in the Mac Finder into the TrueNAS share) transfers the correct Modified date, but the sub-folders Modify field often picks up the date/time-of-copy. (Creation/Birth date/time seems to work properly in all cases.)
Here is an example:
I have the following folders/files (myfile.mp4 inside SUB_FOLDER inside PARENT_FOLDER):
PARENT_FOLDER/
----> SUB_FOLDER/
----------> myfile.mp4 (5.28GB)
On M1 Mac (MacOS Monterey 12.6.8), here are the stats:
Code:
mymac% stat -x /Users/myuser/Desktop/PARENT_FOLDER Access: Fri Nov 24 16:37:53 2023 Modify: Fri Nov 24 16:37:53 2023 Change: Fri Nov 24 16:37:53 2023 Birth: Fri Nov 24 16:34:31 2023 mymac% stat -x /Users/myuser/Desktop/PARENT_FOLDER/SUB_FOLDER Access: Fri Nov 24 16:34:44 2023 Modify: Fri Nov 24 16:34:44 2023 Change: Fri Nov 24 16:37:53 2023 Birth: Sat Nov 18 12:45:20 2023 mymac% stat -x /Users/myuser/Desktop/PARENT_FOLDER/SUB_FOLDER/myfile.mp4 Access: Fri Nov 24 14:03:33 2023 Modify: Sun Nov 20 17:11:15 2016 Change: Fri Nov 24 16:32:26 2023 Birth: Sun Nov 20 17:03:50 2016
My first test was to drag-and-drop SUB_FOLDER over to TrueNAS, and everything works fine:
Code:
truenas% stat -x /mnt/tank/scratch/SUB_FOLDER/ Access: Fri Nov 24 16:40:05 2023 Modify: Fri Nov 24 16:34:44 2023 <<< GOOD Change: Fri Nov 24 16:40:51 2023 Birth: Sat Nov 18 12:45:20 2023 <<< GOOD truenas% stat -x /mnt/tank/scratch/SUB_FOLDER/myfile.mp4 Access: Fri Nov 24 16:40:05 2023 Modify: Sun Nov 20 17:11:15 2016 <<< GOOD Change: Fri Nov 24 16:40:51 2023 Birth: Sun Nov 20 17:03:50 2016 <<< GOOD
Now, the second test was to drag-and-drop the PARENT_FOLDER over to TrueNAS, which is where the problem occurs:
Code:
truenas% stat -x /mnt/tank/scratch/PARENT_FOLDER Access: Fri Nov 24 16:40:55 2023 Modify: Fri Nov 24 16:37:53 2023 <<< GOOD Change: Fri Nov 24 16:41:41 2023 Birth: Fri Nov 24 16:34:31 2023 <<< GOOD truenas% stat -x /mnt/tank/scratch/PARENT_FOLDER/SUB_FOLDER/ Access: Fri Nov 24 16:40:55 2023 Modify: Fri Nov 24 16:41:41 2023 <<< BAD <<<<<< Change: Fri Nov 24 16:41:41 2023 Birth: Sat Nov 18 12:45:20 2023 <<< GOOD truenas% stat -x /mnt/tank/scratch/PARENT_FOLDER/SUB_FOLDER/myfile.mp4 Access: Fri Nov 24 16:40:55 2023 Modify: Sun Nov 20 17:11:15 2016 <<< GOOD Change: Fri Nov 24 16:41:41 2023 Birth: Sun Nov 20 17:03:50 2016 <<< GOOD
Notice that the Modify time of the SUB_FOLDER is incorrect. It reported the time of the copy (Fri Nov 24 16:41:41 2023), instead of the original Modify time on the Mac (Fri Nov 24 16:34:44 2023). Note that I am able to consistently reproduce this, it's not flaky (for a given folder/file structure).
The same issue applies for sub-folders modified years ago, it will sometimes change the sub-folder Modify value to today's date/time.
The reason I say "sometimes" is that (same as mentioned in the original posting) the problem seems to be sensitive to the size (or number?) of files within the SUB_FOLDER. In my tests above, the myfile.mp4 is a 5.28GB file. If I do the same experiment with a small file (3.1MB), the SUB_FOLDER has the correct Modify time.
Here is my testparm info:
Code:
> testparm -s # Global parameters [global] aio max threads = 2 bind interfaces only = Yes disable spoolss = Yes dns proxy = No enable web service discovery = Yes kernel change notify = No load printers = No logging = file max log size = 5120 netbios name = TRUENAS nsupdate command = /usr/local/bin/samba-nsupdate -g registry shares = Yes restrict anonymous = 2 server multi channel support = No server role = standalone server server string = TrueNAS Server unix extensions = No idmap config *: range = 90000001-100000000 fruit:nfs_aces = No rpc_server:mdssvc = disabled rpc_daemon:mdssd = disabled idmap config * : backend = tdb directory name cache size = 0 dos filemode = Yes [scratch] case sensitive = No comment = Scratch Share ea support = No kernel share modes = No mangled names = no path = /mnt/tank/scratch posix locking = No read only = No smbd max xattr size = 2097152 vfs objects = catia fruit streams_xattr shadow_copy_zfs ixnas zfs_core aio_fbsd fruit:locking = none fruit:time machine = yes fruit:resource = stream fruit:metadata = stream fruit:encoding = native nfs4:chown = true ixnas:dosattrib_xattr = false
@anodos : are there any SMB attributes I can try or more info I can provide you? Or should I file a support ticket (if one doesn't already exist on this topic)?