Windows 8 and 8.1 Forums


Unable to Set new Ownership on Hosts.

  1. #1


    Posts : 5
    windows 8.1

    Unable to Set new Ownership on Hosts.


    Hi,
    System: Windows 8.1

    Objective: Trying to edit Hosts file.

    Preparation:

    1. Made extension available for viewing.
    2. Made hidden file available for viewing.
    3. Run Notepad as administrator.
    4. Right Click on Hosts, select Properties. In security, I allow myself as administrator to have all privilege.


    Cannot edit host file to save my changes with information provided from a site with above preparation.
    Doing more web surfing, I discover Ownership is System and I need to change.
    Did as site suggested to make myself, administrator, to have ownership and got "Unable to set new owner on Hosts. Access is denied".

    Thank you for your help. So much hoop jumping to edit Hosts and still unable, what did I miss?. Again, tx for your help in advance.

      My System SpecsSystem Spec

  2. #2


    Right Click Host file, Properties, Security,Advanced, this is where you will find the change ownership I have mine changed to my local account primary User with admin.
      My System SpecsSystem Spec

  3. #3


    I have a little batch file named xhosts.bat:

    @echo off
    %homedrive%
    cd %windir%\system32\drivers\etc
    attrib -s -h -r hosts
    Rem notepad hosts
    x hosts
    attrib +s +h +r hosts

    The attrib is the critical part.
      My System SpecsSystem Spec

  4. #4


    Posts : 5
    windows 8.1

    Response to Windows 8.1 new Ownership change


    Thank Clintlgm and Ztrucker for your reply.

    Clintlgm: Try that prior to my SOS. When into properties, security, advance, etc ( cannot recall details from that web site solution -advance, find, selected admin. It changed for I can see the new ownership to be me but when I try to apply and to OK, that is when I decided to post.

    Ztrucker: Will try your batch solution to change attribute and hope it will work.

    Just to let people reading this post on Windows 8.1 host file changes, all my web surfing from various site did not give complete or proper solution for 8.1. Only discover ownership changes later on and I hope attributes changes by ztrucker will work. It is a bummer on Windows being so drastic, it should mention properly for we do want to change host file.

    Side note: Forgot to mention that some site mention to tell defender not to monitor host file change. I do not use defender, it is disable, and thus not relevant. But being so desperate prior to initial help. I activated defender and told it not to monitor host file. LOL, window 8.1 does not make going back to my prior anti-virus software easy. For in the past u select which anti-virus to use. It looks like I have to do the uninstall and reinstall routine especially when my anit-virus is install and I cannot select. Yes, I am aware we dislike having two anti-virus running. Yes, I cannot find how to select or disable which anti-virus to use. As I said, I have to resort to re-install routine. And u need to be online for help and pity the poor souls who have to rely on Norton when they just got there computer from the store (pre-installed software, internet to get a good virus program, internet again for help when offline virus help should be mandatory - Windows has no offline help on important security).
    This posting is made while on lunch run, hurry, to respond to above reply. tx
      My System SpecsSystem Spec

  5. #5


    Typically when you install an anti-virus program it disabled the built-in Windows Defender.
    There is no select which one you want, never has been that I'm aware of.

    Also, you should not have to change ownership to edit the hosts file, just the attributes.
      My System SpecsSystem Spec

  6. #6


    Posts : 5
    windows 8.1

    Ownership or Attribute to change host file windows 8.1


    Response to Clintlgm and Ztrucker

    Clintlgm: Posted on how I try to change Ownership.
    In Properties/security/advance, I see the following:

    Type: Allow (Principal: Admin) Access: Full Control
    In ownership, I see system and I click change.

    I am then given Select User Group, I select Advance, Find now, and I selected the admin group.
    I see the ownership belong to admin but when I try to apply and to ok, then I get the access deny for me to post for help.

    Ztrucker: In desktop, I created host.bat with your suggestion. I ran it in desktop by clicking on host.bat.
    I also went to command prompt and traverse to hosts. I did the attrib +r etc. I see I have archive (according to my friend that is what a stands for). I tried to change hosts and no luck. My friend surprise that changes did not work when I insisted to look at hosts to see if I had changes. My friend decided to go into command prompt and to do attrib of -r and concluded I have a system problem to change hosts.

    Bottom line, I am trying to change hosts and I have gotten two school of thought. To change ownership and I cannot change ownership. To change attrib and I cannot save my hosts change. Any suggestion appreciated and will try. Tx

    Side note:
    Anti-virus: Cannot recall Vista, 7, etc. U could have a couple of anti working for it is software. But it is advice not for slowing computer or computer problem. You can select which. In windows 8.1, I have to reinstall my anti-virus in order to select and to remove defender. (time to find that software from my portable and to install when it is already install)
      My System SpecsSystem Spec

  7. #7



    BSOD Kernel Dump Analyst
    Posts : 2,273
    Windows 10 Pro


    You can only edit the hosts file when opening the edit program as administrator as far as I know.

    In the thread of my last BSOD, you can find that I've modified the hosts file. I could only do that by opening the editor program as administrator, but I have never taken over the ownership.
      My System SpecsSystem Spec

  8. #8


    You need to modify the batch file to comment out the x hosts line and uncomment notepad hosts line.

    @echo off
    %homedrive%
    cd %windir%\system32\drivers\etc
    attrib -s -h -r hosts
    notepad hosts
    Rem x hosts

    attrib +s +h +r hosts

    I use the X2 editor (the X above) but you wouldn't have that so use notepad. I should have made that change in the original one, sorry.

    If you make that change, what happens when you run xhosts.bat (I don't like calling it hosts.bat for some reason).
    It should open the hosts file in notepad, allow you to make changes then Ctrl+S to save it. When you close the notepad window
    the attributes are reapplied to the hosts file.
      My System SpecsSystem Spec

  9. #9


    Posts : 5
    windows 8.1


    Code:
    @echo off
    %homedrive%
    cd %windir%\system32\drivers\etc
    attrib -s -h -r hosts
    notepad hosts
    Rem x hosts
    attrib +s +h +r hosts
    Thanks for your response ztucker. In the above quote code, I name it xhost.bat and ran it in my desktop. After running the above, I am given the hosts and open in notepad. I made changes and did the CTRL S. I notice the save path to be desktop. Thus, I went to Save As and traverse to the hosts in ... system32/drivers/etc/hosts and try to do the save to affect the hosts.
    I am given a message of Access denied - c: windows/system32/drivers/etc/hosts in command prompt.
    tx

    Axe0: Thank your your reply and I agree with you that an editor must be run as administrator to change hosts. I did all of those in preparation and thus conclude there is more than what I have seen in blogs. LOL, unsigned drivers is an issue in windows 8.1 and had some problem with public domain software. The cost to get a sign driver by MS. So, if users have problem with a software, keep in mind of windows 8.1 installation of drivers (unsigned drivers are not install and need a special method to install - surf on how to install unsigned drivers). It been ages since I play with wamp and in my case with PHP. tx
      My System SpecsSystem Spec

  10. #10


    This is the Security setting for my hosts file:

    Click image for larger version
      My System SpecsSystem Spec

Page 1 of 2 12 LastLast
Unable to Set new Ownership on Hosts.
Related Threads
Hi Everyone, I have created a Local Account and assigned it Administrator rights. However whenever I go to change sensitive files I am presented with an 'Access Denied' message, here is an example of the message that I receive when attempting to add a host to Hosts.ini - ...
Alright, so I've just encountered this problem today and it's inexplicably frustrating. I'm running Windows 8.1 x64 with only Bitdefender Total Security on. A day or so back I could edit and modify my hosts file perfectly. Today, it's just gone. There are 2 hosts.backup file in the...
Changing Hosts File in General Support
I am trying to edit my host file, but the system is telling me that I need to be an administrator, when I am the administrator. I made an attachment in word with screen shot for you to see. Is there a solution for this problem? 25078
Hi All, Have a problem that sounds super simple, but, for some reason isn't... I can't delete a folder! There is a folder left over from an uninstalled product called "Symantec". When I attempt to delete this, I get the message "You require permission from SYSTEM to make changes to this...
I am running Windows 8 64-Bit on a new Advent Monza T100 laptop. I am unable to make changes to Program Files (x86) which is very annoying as this means I have to install programs to my desktop. When I try to move something into Program Files (x86) I am greeted by the usual 'You need permission...
Hi guys.. I'm trying to modifying a system 32 file i.e. twinui.dll.mui in Windows 8 CP. I already taken the ownership of the file using Brink's tutorial. But when I edited the file with Resource Hacker and after tweaking and compiling script, I'm unable to save this file. Here is what I'm...
Eight Forums Android App Eight Forums IOS App Follow us on Facebook