Comment 25 for bug 2007055

Revision history for this message
Nicholas Neumann (aggienick02) wrote :

So I encountered this recently as well. I've got some strong evidence that at least part of the problem is the SMB *server*, specifically a Synology NAS.

We are migrating from a TrueNAS to Synology, and I noticed the timestamp issue after rsync'ing files from an Ubuntu 22.04 client. I simplified by switching to cp -p and then proceeded to grab network captures of copying a single file from the client via cp -p.

Performing cp -p to the TrueNAS device preserves modification time. The same command to the synology device does not. The network captures are very similar. Of particular note, they both send the same SMB2_FILE_BASIC_INFO:
SMB2_FILE_BASIC_INFO
Create: No time specified (0)
Last Access: Jan 22, 2024 13:15:35.923752400 Central Standard Time
Last Write: Nov 22, 2023 13:15:09.416423500 Central Standard Time
Last Change: Jan 22, 2024 13:23:52.482749400 Central Standard Time
File Attributes: 0x00000000
Unknown: 00000000

Interestingly, on Windows, where a simple "copy" command line operation preserves the file modification time on the Synology share, sends slightly different info:
SMB2_FILE_BASIC_INFO
Create: No time specified (0)
Last Access: No time specified (0)
Last Write: Nov 22, 2023 13:15:09.416423500 Central Standard Time
Last Change: Jan 22, 2024 13:34:57.144137700 Central Standard Time
File Attributes: 0x00000000
Unknown: 00000000