SMB File Attribute Error in TN13

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
In the 1st overnight use of 13, I discovered what seems to be a significant error in SMB operation as it relates to file attributes, as described below.

I used a DOS batch file to update changed files in a directory on the server. Overnight today, it backed up the entire folder & subfolders. In looking at the files, all of them had the archive attribute set (not the case before updating from 12U81). At this point, as illustrated below, I found that the attrib command had no effect on the attributes.

I reverted to 12U81 & the archive bit remained set but the attrib command successsfully reset it.

Not sure if this is something unique to my setup (confirmed with 3 of my TN systems) & confirmed with 13RC1. I did not test this with RC1 before release because it was not on my production systems.

For now, I've reverted my 2 production systems to 12U81.

Can anyone confirm this behavior? I'm hesitant to open a bug ticket without confirmation.

Thanks,
John

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

d:\>attrib \\fn2\stores\data\*
A \\fn2\stores\data\backup.bat
A \\fn2\stores\data\alldel.bat

d:\>attrib -a \\fn2\stores\data\*

d:\>attrib \\fn2\stores\data\*
A \\fn2\stores\data\backup.bat
A \\fn2\stores\data\alldel.bat

d:\>
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Okay. I see it. It looks like Samba 4.15 is resetting the archive bit (or making a change that causes OS to reset it) after turning off. Other attrs seem to be working correctly. I'll get this fixed for U1.
 

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
Thanks for the confirmation. Let me know if you'd like me to file a bug report. Guess my age is showing, using a DOS batch file relying on file attribute bits.

John
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thanks for the confirmation. Let me know if you'd like me to file a bug report. Guess my age is showing, using a DOS batch file relying on file attribute bits.

John
FreeBSD has kernel dos modes. It looks like samba is updating timestamps after removing archive (thus causing OS to reset it) :/
 

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
Just a note that it appears 13 reset the archive bit to positive on installation (i.e., regardless of whether any actual file change was written). For example, on a TN13 system file backup.bat in \stores\data shows the archive bit set when the file was created & modified 08/27/19 but accessed 05/04/20. On a TN 12u81 system the same file shows same dates but the archive bit cleared, as expected give the last mod date is years ago. Not sure why just accessing a file without mod would cause the archive bit to be set. Not my expertise but just wanted to note. Thanks again.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Just a note that it appears 13 reset the archive bit to positive on installation (i.e., regardless of whether any actual file change was written). For example, on a TN13 system file backup.bat in \stores\data shows the archive bit set when the file was created & modified 08/27/19 but accessed 05/04/20. On a TN 12u81 system the same file shows same dates but the archive bit cleared, as expected give the last mod date is years ago. Not sure why just accessing a file without mod would cause the archive bit to be set. Not my expertise but just wanted to note. Thanks again.
Is that local access or SMB access?
 

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
Is that local access or SMB access?
File date info is what is listed from Windows 7 file properties or from dir command shell, as well as from server shell ls command.. Again, on a TN13 manual install from 12u81 about 5/9/22, Win7 properties shows the archive attribute set on all files after TN13 install even though file dates (most recent being accessed) predate TN13 install.
 

jlpellet

Patron
Joined
Mar 21, 2012
Messages
287
Is this fix going into the nightlies? If so, I'll plan to put one system on a nightly to test.
Thanks,
John Pellet
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Is this fix going into the nightlies? If so, I'll plan to put one system on a nightly to test.
Thanks,
John Pellet
It will be in the nightlies soon-ish. I need update the FreeBSD port to use the latest commit from our samba repo. I have a few other fixes I'm working on ATM for U1 before re-syncing.
 
Top