My "hosts" file stays locked
I have a third party program (which I trust of course) trying to edit my c:\windows\system32\drivers\etc\hosts file, but it can't edit it. The file remains read-only no matter what I do.
I noticed that "Lock Hosts file as protection against hijackers" has been checked and thought it might be the reason why I can't take the read-only restriction off, but how do I uncheck it? When I uncheck it, it looks like it unchecked it, but if I go to some other part of the program like "Resident" and go pack to IE tweaks, it's checked again.
I tried unchecking it by running Spybot normally and as an administrator (which I am) and in safe mode, but they didn't help. I have Vista Enterprise 32bit and the newest version of Spybot (had a bit older version as well and it didn't work with that one either).
Thanks for the help!
Spybot Advisor Team
No,the Lock Hosts file as protection against hijackers shouldn't be the reason you cannot remove the read-only restriction on the Hosts file.Checkmarking the Lock Hosts file as protection against hijackers in Spybot makes the hosts file read only,and nothing more.
When Spybot immunizes the hosts file,it automatically makes the hosts file read only after it's done,but it shouldn't be happening if you're just going to another part of the program like Resident,etc.
What happens when you go to C:\Windows\System32\drivers\etc and uncheck the Read-Only attribute,does it uncheck it,but then it's re-checked when you look again,also?
Do you have any other security programs that might protect the hosts file?
I'm not totally up to date on the ones that do that now,but in the past some programs that protected the hosts file were Zone Alarm,Stopzilla and if I recall this correctly,SpySweeper.
Thanks for the response!
The problem is now solved, but I'll explain what happened so that you can help the next guy having the same problem
Originally when I tried to uncheck read-only from the hosts file properties, it said that I need permission from the administrator (which I am). When I hit ok or whatever, read only was unchecked, but when I closed the properties window and and opened again, the check was there again as expected.
Also, I ran command prompt as an administrator and tried to apply attrib -s -h -r to the file, but it said that the permission was denied. And like I said, I couldn't uncheck the "lock hosts file..." option in spybot.
I'm aware of the problem with ZoneAlarm which I don't have. I only have avast! and Malwarebytes' Anti-Malware besides Spybot and none of them seemed to cause the problem.
So what I did was I opened the hosts file in notepad and copied everything inside the file and pasted it to another notepad window. Then I opened up Anti-Malware, went to "More Tools" and ran the FileASSASSIN tool to delete the hosts file. I didn't try if I was able to delete the hosts file without the tool. Anyways, it got deleted and then I saved the copied hosts file text in the notepad as a new hosts file.
Then I ran the software that tried to edit the hosts file and it worked! Then I set the new hosts file read only, applied attrib -s -h -r to it and opened Spybot and saw that the "Lock hosts file..." option was unchecked and decided to check it. And yeah, even though the option is checked, I can still uncheck read only now normally. So actually the option in Spybot wasn't the reason why the hosts file seemed to be "locked", just like you said.
Anyways, the problem is solved. Thanks for the help! I'll let you know if my method causes another problems.
Spybot Advisor Team
Glad the problem is solved.