Jump to content


  • 0
anyweb

how to edit the hosts file in Vista

Question

if you try to edit your hosts file (for example to add a local ip address as your webserver) manually in Vista you;ll be denied from doing so by the file security laid down in Vista.

 

To fix it, you'll need to change the user 'users' file permissions to 'modify' on the hosts file.

 

To do this right click on the file, choose properties, security, advanced, then click on 'Edit'

 

Accept (continue) the UAC warning dialog, and click and highlight the 'users' username. click 'edit' and make sure to select all of the following attributes

 

Traverse Folder/Execute File

List Folder/Read Data

Read Attributes

Read Extended Attributes

Create Files/Write Data

Create Folders/Append Data

Write Attributes

Write Extended Attributes

Delete

Read Permissions

Synchronize

 

once those are selected and you apply your changes you can indeed 'finally' save the hosts file changes...

permissions1.jpg

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

if you try to edit your hosts file (for example to add a local ip address as your webserver) manually in Vista you;ll be denied from doing so by the file security laid down in Vista.

 

To fix it, you'll need to change the user 'users' file permissions to 'modify' on the hosts file.

 

To do this right click on the file, choose properties, security, advanced, then click on 'Edit'

 

Accept (continue) the UAC warning dialog, and click and highlight the 'users' username. click 'edit' and make sure to select all of the following attributes

 

 

 

once those are selected and you apply your changes you can indeed 'finally' save the hosts file changes...

 

A easy way to do this without modyfing file permissions so some bad people can take over the host file is too execute the following command line:

 

runas /user:administrator "notepad c:\windows\System32\Drivers\Etc\Hosts"

 

or

 

runas /user:administrator@domain.nl "notepad c:\windows\System32\Drivers\Etc\Hosts"

 

type your password and Notepad opens your hosts file wich you can edit as you like.

 

Have fun with this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.