attrib does not reset attribute

Nov 14, 2011
20
0
On Win10 21H2, TCC 29 (also with 22), we use attrib to reset -A but it does not work ... see sample below.

[0][e:\bs13\init]attrib Init.rc
___A_____________ E:\BS13\init\INIT.rc

[0][e:\bs13\init]attrib Init.rc -A
___A_____________ -> ______N__________ E:\BS13\init\INIT.rc

[0][e:\bs13\init]attrib Init.rc
___A_____________ E:\BS13\init\INIT.rc

An idea ...
Thanks
 
Apr 2, 2011
1,585
14
55
North Carolina, USA
from the Help:

Code:
ATTRIB [/= /A:[[-+]rhsa] /D /E /I"text" /L /N[EJ] /O:[-]acdeginorstuz /P[n] /Q /S[[+]n]] [+|-[AHIOPRSTUVX]] [@file] files ...

so place the -a before the filename - not after
 
Nov 14, 2011
20
0
Same result and it works before or after
The output confirms it works ___A_____________ -> ______N__________ E:\BS13\init\INIT.rc

Sample with -A befiore

[0][e:\atf\lib]attrib atfdmt32.lib
___A_____________ E:\ATF\LIB\atfdmt32.lib

[0][e:\atf\lib]attrib -A atfdmt32.lib
___A_____________ -> ______N__________ E:\ATF\LIB\atfdmt32.lib

[0][e:\atf\lib]attrib atfdmt32.lib
___A_____________ E:\ATF\LIB\atfdmt32.lib
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,660
105
Albuquerque, NM
prospero.unm.edu
I'm guessing that you don't have rights to change attributes for that file. If drive E: is a network drive, you may need to log in as a network administrator. If drive E: is a local drive, try running Take Command elevated ("as administrator").
 
Nov 14, 2011
20
0
I have full rights and it's only with certain files in the directory.
I tested with cmd and got the same result, so it's not related to tcc but since I've only been using that for years.
I also tested with explorer and same case there must be something else causing this anomaly.
This case can be closed, sorry.
 
Jan 12, 2014
515
11
Switzerland, SO
@Marc.Ottevaere

Just little thought about your problem and some ideas ...

1) Maybe, as a first step you could read something like the following article ...
Use PowerShell to clear stubborn file attributes | greiginsydney.com

2) You could try it in Windows Safe Mode.

3) If it's a portable device, you could try it with another PC.

4) You could try as administrator to copy or move the problematic files in another directory and then back.

5) You could try as user to copy or move the problematic files in another directory and then back.

6) Is the related drive ok or if repair needed?

Good luck
 
Nov 14, 2011
20
0
Thanks for your answer but I think the problem is coming from "CrowdStrike Windows Sensor".
This app is installed on the different servers on which we have the problem.
We continue to investigate.
Regards.