22 posts in this topic

Posted

Hi,

 

I am trying to add a website address & name to windows "host" file but when trying to save it I get the message that I don't have permission to save in this location & tp contact administrator. This is my personal PC & I am the administrator in user accounts in control panel. No one else has any accounts on this PC.

 

How do I resolve this ?

 

Thanks

Share this post


Link to post
Share on other sites

Posted

You're editing it in notepad?

Usually should work, try making a copy onto your desktop, modifying it there, then before you put it back, rename the original host file into a .bak extension, then cut the modified file from desktop back in, see how you get along

Failing that, you could try temporarily lowering UAC settings (assuming you're using windows)

Share this post


Link to post
Share on other sites

Posted

Try running notepad as an administrator.

 

If that doesn't work, do the save a copy to your desktop and then copy it in from explorer as Aheer says.

2 people like this

Share this post


Link to post
Share on other sites

Posted

Right-click Notepad and run as Administrator, then open host file from Notepad.  I haven't tried in Windows 8, but that worked in Win 7.

 

You can also give your use permission to edit that file by right-clicking, going to Security, than adding yourself.  I believe that's only in Pro or above, though.  Also with Simple File Sharing turned off.

1 person likes this

Share this post


Link to post
Share on other sites

Posted

Running Win-7 Ultimate (64 bit)

 

Tried both methods, running as an admin but didn't work.

 

Tried Edit add name but came up with a message that " More than one object matched the name. Select one or more names from this list or reenter the name "

 

Haven't tried the desktop method yet though.

Share this post


Link to post
Share on other sites

Posted

- Copy your hosts file to desktop

- Edit the hosts file you just copied

- Paste and replace the hosts file you just edited, from desktop to drivers/etc/.

2 people like this

Share this post


Link to post
Share on other sites

Posted

search for "notepad"

right-click > run as admin

 

open hosts file from with notepad (as opposed to dragging and dropping it)

1 person likes this

Share this post


Link to post
Share on other sites

Posted

If Shiranui's suggestion does not work, then try this:

 

right-click on that hosts file and select Properties then select security tab

 

and see what permissions it is being used...

 

if you notice that is not writable for that username (the one you are on which is under the Users group), then you can change the permission for that file on that user's account.

 

Once you are done with changing the permissions, go back to the notepad and see if editing and saving work for you.

 

After finish editing that file, go back to security tab and change back to where it was for protection.

Share this post


Link to post
Share on other sites

Posted

Hello,

Try running notepad as an administrator.
 
If that doesn't work, do the save a copy to your desktop and then copy it in from explorer as Aheer says.

 

search for "notepad"
right-click > run as admin
 
open hosts file from with notepad (as opposed to dragging and dropping it)

These work perfectly. If not, you are doing it wrong

Share this post


Link to post
Share on other sites

Posted

I always just add myself to the files security properties and give myself modify writes..

 

Despite what was said, you can't be locked out as long as you are an Administrator, or there is an other admin account on the system.

Share this post


Link to post
Share on other sites

Posted

I dont recommend this because there is a small chance you can potentinally lock yourself out of a file. Changing permission for Windows files to modify them is generally a bad idea.


I do this all the time. No plm so far. I know what I am doing.

Share this post


Link to post
Share on other sites

Posted

Adding yourself to the file permissions could potentially be bad. It's in the system folder and if you have permission to edit it by default any malware you might accidentally run could add entries to it silently and open your computer up to more infections. It's best to just copy it and copy it back after editing it.

Share this post


Link to post
Share on other sites

Posted

Pretty sure you can't modify files within system32, do what others are suggesting, copy to desktop, modify, copy back, which does work.

Share this post


Link to post
Share on other sites

Posted

Hello,
 
These work perfectly. If not, you are doing it wrong

Share this post


Link to post
Share on other sites

Posted

Adding yourself to the file permissions could potentially be bad. It's in the system folder and if you have permission to edit it by default any malware you might accidentally run could add entries to it silently and open your computer up to more infections. It's best to just copy it and copy it back after editing it.

 

If you leave writable on, then you have security risk...

 

Like I said before, you can turn writable off after finish editing the file.   No problem.

 

It works for me.

 

Or add an user to that permission with write enabled... then after you finish editing, you can delete that user from that permission. That simple.

 

My computer has not been infected or crashed since I have done this for awhile now.

 

If you know what you are doing, you are fine.

Share this post


Link to post
Share on other sites

Posted

So this is not hard people

 

Run as admin

 

[attachment=357571:runasadmin.png]

 

Open file

 

[attachment=357573:openfile.png]

 

Edit file and save

 

[attachment=357575:save.png]

 

Works

 

[attachment=357577:workshostfileedit.png]

 

Some of the suggestions in this thread are just way out there..

 

 

 

 

2 people like this

Share this post


Link to post
Share on other sites

Posted

So this is not hard people

 

Run as admin

 

attachicon.gifrunasadmin.png

 

Open file

 

attachicon.gifopenfile.png

 

Edit file and save

 

attachicon.gifsave.png

 

Works

 

attachicon.gifworkshostfileedit.png

 

Some of the suggestions in this thread are just way out there..

 

but don't forget that some programs can lock that hosts file for protection.. which is why some people can't edit that file.

Share this post


Link to post
Share on other sites

Posted

Sure OK -- some AV software might do that..  I would hope the person wanting to edit their host file would understand their system enough to know that their "security" software is preventing that.  Shouldn't they get a error when trying to save that it was blocked, shouldn't their security software log show attempt to edit host was blocked, etc.

 

So its not very good security software if all I have to do is overwrite the whole file, or change its extension, etc.

 

Nor should security software blocking changes to host file care what the security permissions on the file are.  If "security" software is blocking the access - and any of these methods work its really bad security software ;)

 

Change the setting on your security software to allow the edit, then run notepad as elevated and edit the file - it is that simple.

Share this post


Link to post
Share on other sites

Posted

My God,

You guys are genius & I am grateful for your suggestions.

Every precautions & consequences you suggested are true.

First my antivirus deleted the host file when I tried to modify & paste it back.

Then somehow I pasted back the original unedited copy..

Now my PC is totally f%#@&d up & whenever I try to  touch something with my mouse, the SOB opens it  & I am afraid to touch anything..

So I am back to reinstall the OS.

What I have learned from all of you is not to fool around with system files. Am I correct ?

Share this post


Link to post
Share on other sites

Posted

Muck around with system files all you want....in a Virtual Machine, and only if you know what you are doing.

Share this post


Link to post
Share on other sites

Posted

The host file while a system file, is meant to be edited - but since accounts no longer run with the admin token to edit you must be elevated to have access.  This is for your own protection, so if you run some bad code system files like the host file can not be edited sending you to the wrong place for google or preventing access to antivirus sites, etc. etc..

 

What you should learn from this is understand how to configure your own security software ;)

 

What antivirus are you using btw?

Share this post


Link to post
Share on other sites

Posted

Hello,

So this is not hard people
 
Run as admin
 
 
Open file

 
Edit file and save

 
Works

 
Some of the suggestions in this thread are just way out there..

[Sarcasm]
No, he needs to rip everything except his RAM, CPU, Mouse (no keyboard, security risk), PSU, and the HDD containing the hosts file out of his PC. Then boot up a LiveUSB like Tails and make a VM inside of that of Tails also and using vi rewrite his entire hosts file using a on-screen keyboard.
Its the only to be sure, BudMan
[/Sarcasm]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.