Created date changes every time file is modified

JJ08

Cadet
Joined
Jun 10, 2021
Messages
6
Hi everyone.
I'm new to TrueNAS.

I'm having a problem where every time I make changes to a file, the 'Created date' changes to the date/time I modified the file. As a result, after editing, these files end up with both the 'Created date' and the 'Modified date' having the same date/time. I noticed this happening for almost all file types: photos (.png, .jpg, .tiff), Word documents, Excel documents, password managers (KeePass), Photoshop files (.psd), Emacs org text documents (.org), and more. The only files where the 'Created date' doesn't change after modification are .txt and .markdown files. I'm not sure why some file types don't have this problem.

In the attachments, I just rotated the photo using the default Windows 10 Photos app and that changed the 'Created date' to the date/time I modified the photo, when it should only be the 'Modified date' that changes. After editing, the 'Created date' and 'Modified date' are the same. I tested editing the same photo on macOS using the default rotate option in Finder and the 'Created date' also changes. For other files like Word and Excel documents, simply writing to it will change the 'Created date'. Is there a way to fix this on FreeNAS so the 'Created date' doesn't change when files are modified?

Photo with correct created date, before editing it.PNG
Photo with wrong created date, after editing on freenas SMB share.PNG


Thanks for the help.

Using SMB to share datasets
Running FreeNAS 11.3-U5 on bare metal
Motherboard: SuperMicro X10SDV-TLN4F
CPU: Intel Xeon D-1541
RAM: 64GB ECC
HDD: 2x 10TB Seagate IronWolf Pro in mirror
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try setting ixnas:dosattrib_xattr=true in your share's Auxiliary Parameters, and then restarting the SMB service.
 

JJ08

Cadet
Joined
Jun 10, 2021
Messages
6
Try setting ixnas:dosattrib_xattr=true in your share's Auxiliary Parameters, and then restarting the SMB service.

Thanks for the response. I tried that just now and no luck :( The 'Created date' still changed after modification. With this setting, after editing the photo, a temporary TMP file was created but after closing the photo, the TMP file merged with the original JPG and the 'Created date' still changed.

Capture.PNG
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Actually, that's not the file system's fault. That's how the JPG editor operates; it replaces the original file with the TMP file, and renames the TMP file. Try something simple, like a TXT file, and modify it in Notepad.
 

JJ08

Cadet
Joined
Jun 10, 2021
Messages
6
Actually, that's not the file system's fault. That's how the JPG editor operates; it replaces the original file with the TMP file, and renames the TMP file. Try something simple, like a TXT file, and modify it in Notepad.

I see. But the 'Created date' is still changing after modifying the photo, even with the TMP file, so I'm not sure what's wrong. I tried writing to a Word document and an Excel spreadsheet and the 'Created date' is still changing after modifying the file so it seems like the problem is not fixed yet.

Before editing, has correct 'Created date' -> After editing, 'Created date' changed to the date/time I modified it.

excel before editing.PNG
excel after editing2.PNG
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Did you restart the SMB service after making the change to the Aux parameter?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, then create a new share with ixnas:dosattrib_xattr=true, and try the same thing, restarting SMB after the share creation.
 

JJ08

Cadet
Joined
Jun 10, 2021
Messages
6
OK, then create a new share with ixnas:dosattrib_xattr=true, and try the same thing, restarting SMB after the share creation.

Will try that.

So I created a new dataset, then created a new share for that dataset. Added ixnas:dosattrib_xattr=true to the share's Auxiliary Parameters. Then restarted the SMB service. I tested the same Excel document (copied over from my local hard drive), modified the Excel document, but the 'Created date' still changed to the date/time I modified it.

Before editing -> After editing

excel1.PNG
excel3.PNG




This is what my share looks like:

share.PNG
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How are you defining the share? Are you using a preset under Purpose? In my shares, I use "No presets", and configure everything myself:

1623463247918.png
 

JJ08

Cadet
Joined
Jun 10, 2021
Messages
6
How are you defining the share? Are you using a preset under Purpose? In my shares, I use "No presets", and configure everything myself:

Oh interesting, my Share looks quite different. I don't have the 'Purpose' setting or any option to choose presets. The version I'm running is FreeNAS 11.3-U5


Opera Snapshot_2021-06-11_193610_10.0.0.251.png
 
Top