Can't edit hosts file due to administrator rights

Knocks

New Member
Messages
28
I am getting error "Save failed - Please check if this file is opened in another program" when trying to edit the hosts file in Notepad++. This has only started happening after a fresh installation of Windows 8 on a new computer. My previous computer with Windows 8.1 was able to do it correctly without any errors. I am using only one account on both computers, but for some reason on the new computer, the UAC keeps getting in the way. I have lowered the UAC warnings all the way down but that hasn't helped. Is there another setting I'm missing?

Note that I don't want to right-click Notepad++ and choose "Run as administrator" every time I want to edit a system file. I see that as a waste of time and an unnecessary step since I am already using an administrator account. I didn't have to do that on the old computer.
 

My Computer

System One

  • OS
    Windows 8.1 x64 Pro
    Computer type
    PC/Desktop
Note that I don't want to right-click Notepad++ and choose "Run as administrator" every time I want to edit a system file. I see that as a waste of time and an unnecessary step since I am already using an administrator account. I didn't have to do that on the old computer.
It is totally irrelevant if you want to run the editor as administrator or not. You do either that, or you take full ownership of the Hosts file. Taking ownership of system files is not recommended but as it is your PC, you do whatever you want to. Basically you only have these two options, take ownership or run the editor as administrator.

As a built-in security measure, Windows does not allow user saving to system folders by default.

http://www.eightforums.com/tutorial...le-folder-drive-registry-key-windows-8-a.html

Kari
 

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    Laptop
    System Manufacturer/Model
    HP ENVY 17-1150eg
    CPU
    1.6 GHz Intel Core i7-720QM Processor
    Memory
    6 GB
    Graphics Card(s)
    ATI Mobility Radeon HD 5850 Graphics
    Sound Card
    Beats sound system with integrated subwoofer
    Monitor(s) Displays
    17" laptop display, 22" LED and 32" Full HD TV through HDMI
    Screen Resolution
    1600*900 (1), 1920*1080 (2&3)
    Hard Drives
    Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
    External: 2TB for backups, 3TB USB3 network drive for media
    Cooling
    As Envy runs a bit warm, I have it on a Cooler Master pad
    Keyboard
    Logitech diNovo Media Desktop Laser (bluetooth)
    Mouse
    Logitech MX1000 Laser (Bluetooth)
    Internet Speed
    50 MB VDSL
    Browser
    Maxthon 3.5.2., IE11
    Antivirus
    Windows Defender 4.3.9431.0
    Other Info
    Windows in English, additional user accounts in Finnish, German and Swedish.
Again, I did not do any of this on my old computer. I disabled UAC, and that was the end of the prompts and the errors.

And generally, if you are already running the entire OS as an administrator, is it not redundant to take ownership of individual files or folders? Is this not the equivalent of logging in as root (sudo) in Linux?
 

My Computer

System One

  • OS
    Windows 8.1 x64 Pro
    Computer type
    PC/Desktop
There's a big difference in between an administrative user account and Windows built-in administrator account. Only a local administrator user has right to elevate a command to use built-in administrator rights, that's why Windows needs at least one local administrator account. When you run a program as administrator (elevate it), it is not run using your local administrator rights but instead, using your local rights the command can be elevated to use built-in administrator rights.

I am not sure how you managed this on your old computer but usually that is not possible, by default you cannot save in system folders. Try to extract a zip file to Program Files folder or save a Word document in Windows folder, the result is the same: Access denied.

Only workarounds are those two options I mentioned in my previous post.

Kari
 

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    Laptop
    System Manufacturer/Model
    HP ENVY 17-1150eg
    CPU
    1.6 GHz Intel Core i7-720QM Processor
    Memory
    6 GB
    Graphics Card(s)
    ATI Mobility Radeon HD 5850 Graphics
    Sound Card
    Beats sound system with integrated subwoofer
    Monitor(s) Displays
    17" laptop display, 22" LED and 32" Full HD TV through HDMI
    Screen Resolution
    1600*900 (1), 1920*1080 (2&3)
    Hard Drives
    Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
    External: 2TB for backups, 3TB USB3 network drive for media
    Cooling
    As Envy runs a bit warm, I have it on a Cooler Master pad
    Keyboard
    Logitech diNovo Media Desktop Laser (bluetooth)
    Mouse
    Logitech MX1000 Laser (Bluetooth)
    Internet Speed
    50 MB VDSL
    Browser
    Maxthon 3.5.2., IE11
    Antivirus
    Windows Defender 4.3.9431.0
    Other Info
    Windows in English, additional user accounts in Finnish, German and Swedish.
I still have my old computer. Can you help me check the settings on it and replicate them?
 

My Computer

System One

  • OS
    Windows 8.1 x64 Pro
    Computer type
    PC/Desktop
First: on your old computer, check who / what is the owner of the Hosts file:

2014-06-15_22h34_09.png
(Click to enlarge.)​

If it's System as by default, then it might be that owner / permissions of one of the folders in the Hosts path (C:\Windows\System32\drivers\etc) has been changed and inherited by subfolders.
 

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    Laptop
    System Manufacturer/Model
    HP ENVY 17-1150eg
    CPU
    1.6 GHz Intel Core i7-720QM Processor
    Memory
    6 GB
    Graphics Card(s)
    ATI Mobility Radeon HD 5850 Graphics
    Sound Card
    Beats sound system with integrated subwoofer
    Monitor(s) Displays
    17" laptop display, 22" LED and 32" Full HD TV through HDMI
    Screen Resolution
    1600*900 (1), 1920*1080 (2&3)
    Hard Drives
    Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
    External: 2TB for backups, 3TB USB3 network drive for media
    Cooling
    As Envy runs a bit warm, I have it on a Cooler Master pad
    Keyboard
    Logitech diNovo Media Desktop Laser (bluetooth)
    Mouse
    Logitech MX1000 Laser (Bluetooth)
    Internet Speed
    50 MB VDSL
    Browser
    Maxthon 3.5.2., IE11
    Antivirus
    Windows Defender 4.3.9431.0
    Other Info
    Windows in English, additional user accounts in Finnish, German and Swedish.
Hi. I checked the settings, and the owner of that file is my administrator account, as opposed to SYSTEM. But I don't think I had ever set the ownership for that file.
 

My Computer

System One

  • OS
    Windows 8.1 x64 Pro
    Computer type
    PC/Desktop
How old is your old computer? I mean, are you sure you have not either edited the permissions and owner, or for instance created a new Hosts file to another location and then copied it over the original? If you for instance create a new Hosts file, save it to desktop, and then replace the original in C:\Windows\System32\drivers\etc with your new one, it is no longer owned by System.

The same if you copy the original Hosts, then replace it with you copy.
 

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    Laptop
    System Manufacturer/Model
    HP ENVY 17-1150eg
    CPU
    1.6 GHz Intel Core i7-720QM Processor
    Memory
    6 GB
    Graphics Card(s)
    ATI Mobility Radeon HD 5850 Graphics
    Sound Card
    Beats sound system with integrated subwoofer
    Monitor(s) Displays
    17" laptop display, 22" LED and 32" Full HD TV through HDMI
    Screen Resolution
    1600*900 (1), 1920*1080 (2&3)
    Hard Drives
    Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
    External: 2TB for backups, 3TB USB3 network drive for media
    Cooling
    As Envy runs a bit warm, I have it on a Cooler Master pad
    Keyboard
    Logitech diNovo Media Desktop Laser (bluetooth)
    Mouse
    Logitech MX1000 Laser (Bluetooth)
    Internet Speed
    50 MB VDSL
    Browser
    Maxthon 3.5.2., IE11
    Antivirus
    Windows Defender 4.3.9431.0
    Other Info
    Windows in English, additional user accounts in Finnish, German and Swedish.
You're right, I have no idea, because it was a long time ago. I replaced the hosts file on my new computer with a newly created duplicate and now have full permissions to it. Thanks for the help. :)

A related question. I have a banking app with a shortcut on the desktop. The shortcut requires elevated privileges on the new computer, for some reason, and has a shield icon imposed on top of the regular icon. On the old computer, it's just a normal shortcut. I'm pretty sure I used the same installation file for both. How can I make this shortcut "normal" on the new PC?
 

My Computer

System One

  • OS
    Windows 8.1 x64 Pro
    Computer type
    PC/Desktop

My Computer

System One

  • OS
    Windows 8.1 Pro with Media Center
    Computer type
    Laptop
    System Manufacturer/Model
    HP ENVY 17-1150eg
    CPU
    1.6 GHz Intel Core i7-720QM Processor
    Memory
    6 GB
    Graphics Card(s)
    ATI Mobility Radeon HD 5850 Graphics
    Sound Card
    Beats sound system with integrated subwoofer
    Monitor(s) Displays
    17" laptop display, 22" LED and 32" Full HD TV through HDMI
    Screen Resolution
    1600*900 (1), 1920*1080 (2&3)
    Hard Drives
    Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
    External: 2TB for backups, 3TB USB3 network drive for media
    Cooling
    As Envy runs a bit warm, I have it on a Cooler Master pad
    Keyboard
    Logitech diNovo Media Desktop Laser (bluetooth)
    Mouse
    Logitech MX1000 Laser (Bluetooth)
    Internet Speed
    50 MB VDSL
    Browser
    Maxthon 3.5.2., IE11
    Antivirus
    Windows Defender 4.3.9431.0
    Other Info
    Windows in English, additional user accounts in Finnish, German and Swedish.
Back
Top