I have a TrueNAS Mini XL+ with 32GB of memory running TrueNAS-13.0-U3.1 for home use. The systems typically using these shares are Windows 10 or Windows 11, with most testing being performed on Windows 10.
Problem
I don't seem to be able to prevent the Archive flag from being set on new or modified files in my SMB shares. I know that this is expected behavior, and might not even be a performance issue with newer versions, but I don't use any backup software that relies on these flags and would just as soon not have them set.
Troubleshooting
I've done a lot of various tests, and I won't run through them all here for the sake of brevity. However I'm happy to re-run or share results of the things I've tried.
I've read through the following documents:
Disabling DOS Attributes to improve samba browsing performance
CIFS directory browsing slow? Try this
Samba Advanced Disk Shares
smb4.conf manual page
There are others, but the generally tend to say the same things in a different way. My takeaway is that I should be able to disable this functionality by preventing SMB from setting the old DOS modes and disabling Extended Attribute support. However, when I enter the following lines into my SMB service configuration (and verify by reviewing smb4.conf), nothing changes.
With these in place, the Archive flag is still set when viewing in Windows Explorer when a file is created or modified. I also tried setting the create and directory masks in SMB, but I'm not confident that I was selecting correct permissions. I have tried both 744 and 644 on create mask, plus 755 and 655 on directory mask. In all cases, the Archive property was still set automatically on creation/modification.
I'm clearly missing something somewhere, but at this point I'm not sure what it might be. I was hoping to get some assistance in finding the correct solution.
Problem
I don't seem to be able to prevent the Archive flag from being set on new or modified files in my SMB shares. I know that this is expected behavior, and might not even be a performance issue with newer versions, but I don't use any backup software that relies on these flags and would just as soon not have them set.
Troubleshooting
I've done a lot of various tests, and I won't run through them all here for the sake of brevity. However I'm happy to re-run or share results of the things I've tried.
I've read through the following documents:
Disabling DOS Attributes to improve samba browsing performance
CIFS directory browsing slow? Try this
Samba Advanced Disk Shares
smb4.conf manual page
There are others, but the generally tend to say the same things in a different way. My takeaway is that I should be able to disable this functionality by preventing SMB from setting the old DOS modes and disabling Extended Attribute support. However, when I enter the following lines into my SMB service configuration (and verify by reviewing smb4.conf), nothing changes.
ea support = no
store dos attributes = no
map archive = no
map hidden = no
map readonly = no
map system = no
With these in place, the Archive flag is still set when viewing in Windows Explorer when a file is created or modified. I also tried setting the create and directory masks in SMB, but I'm not confident that I was selecting correct permissions. I have tried both 744 and 644 on create mask, plus 755 and 655 on directory mask. In all cases, the Archive property was still set automatically on creation/modification.
I'm clearly missing something somewhere, but at this point I'm not sure what it might be. I was hoping to get some assistance in finding the correct solution.
Last edited: