Do not have access to hosts file

envz28

New member
Local time
8:46 AM
Messages
4
Hi all,

I've been trying to battle a little problem for quite some time now.

My hosts file has been encrypted with some different IP addresses which inevitably redirect me to some websites.

I have tried to open my hosts file through notepad as administrator, then take out the bad IP addresses and when I try to save I get access denied.

The hosts file itself is set to read only and I do not have "access" to change it.

My user account is the sole account on this PC and is infact the administrator.

tldr:

-Note pad administrator won't work with changing hosts file
-hosts file won't let me change securities parameters

I'm begging for help! I've spent several hours trying to find a guide and every single one says to use Notepad in administrator but that just isn't working for me

Edit-All these attempts have been in safemode with networking
 

My Computer My Computer

OS
64 bit home premium

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Build
OS
Windows 10 Pro x64, Arch Linux
CPU
Intel Core 2 Quad Q8200 OC'd 3.08GHz
Motherboard
Asus Rampage formula LGA775
Memory
8GB DDR2 900Mhz
Graphics Card(s)
MSI GT730 2GB GDDR5 (Kepler)
Sound Card
Supreme FX2
Monitor(s) Displays
Samsung LS22F350 LED
Screen Resolution
1080P
Hard Drives
Kingston SSDNow UV400 120GB, 500GB Hitachi, 2TB Samsung, 500GB Seagate FreeAgent, 640GB Samsung, 160GB Toshiba (Arch)
PSU
AeroCool 500W Bronze
Cooling
Cooler Master V6 + 3X fans
Keyboard
Prolink keyboard
Mouse
Logitech M705
Internet Speed
1MiB/s
Browser
Chrome Beta
Influx~ I said several times that I ran notepad as administrator :(

Yowanvista~

I tried running the tool and that did not solve the problem. The hosts file is still set to read only and I do not have access to change it.

I tried the manual method and it won't let me save the original file as hosts.old

Nor when i right click within the etc file does new give me an option to make a text document.

I'm open to more ideas!
 

My Computer My Computer

OS
64 bit home premium
The following lines of code have been posted numerous times, but it is a useful batch file to have in your tool kit. It flushes the DNS cache and resets Microsoft's Host File.

@Echo on
pushd\windows\system32\drivers\etc

attrib -h -s -r hosts
echo 127.0.0.1 localhost>HOSTS
attrib +r +h +s hosts
popd
ipconfig /release
ipconfig /renew
ipconfig /flushdns
netsh winsock reset all
netsh int ip reset all
shutdown -r -t 1
del %0

Copy and paste the above in to Notepad and save it as Flush.bat to the desktop. Close all running applications and then right-click on the file and choose to run as an administrator, providing the necessary credentials when prompted. Your computer will automatically restart itself.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dwarf Dwf/11/2012 r09/2013
OS
Windows 8.1 Pro RTM x64
CPU
Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.4GHz)
Motherboard
ASRock Z77 Extreme4-M
Memory
4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB)
Graphics Card(s)
MSI GeForce GTX770 Gaming OC 2GB
Sound Card
Realtek High Definition on board solution (ALC 898)
Monitor(s) Displays
ViewSonic VA1912w Widescreen (VGA)
Screen Resolution
1440x900
Hard Drives
OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0
PSU
XFX Pro Series 850W Semi-Modular
Case
Gigabyte IF233
Cooling
1 x 120mm Front Inlet 1 x 120mm Rear Exhaust
Keyboard
Microsoft Comfort Curve Keyboard 3000 (USB)
Mouse
Microsoft Comfort Mouse 3000 for Business (USB)
Internet Speed
NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2)
Antivirus
Avast! 8.0.1497
Browser
IE 11
Other Info
Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
WEI Score: 8.1/8.1/8.5/8.5/8.25
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter)
Dwarf~ I did your steps, not 100% what the object of that was. However it still did not fix the problem. From reading that command it looked like a reset of the hosts file but yeah still didn't work

Influx~ I am following the steps but am stuck at a part in which I tried way before hand and it still will not work

*On step 5 in "How to Grant Permission in Windows 7"

When trying to change the permission settings to Full Control I am unable to check the box.

UPDATE:

*my etc folder had the owner set to TrustedInstaller. I then changed the owner of the file to Ben *i.e. my account*

I was then allowed to check the "Full Control" setting, however when I tried to apply the change I was given:

Error Applying Security

An error occured while applying security information to:

C:\Windows\System32\drivers\etc\protocol

Access is denied

More help needed!

*Side note, this sucks lol*
 

My Computer My Computer

OS
64 bit home premium
So i got the bright idea to go to the root:

I went to my C: and right clicked and changed the security level there to allow me Full Access and I did this to every file up to etc. I successfully was able to change the hosts file to allow me Full Control.

As of right now my hosts file is clear of all those pesky advertising IP addresses.

I appreciate all your help. Your suggestions sort of led me onto the track. I will update if things go haywire

Thanks so much!

Env
 

My Computer My Computer

OS
64 bit home premium
Back
Top