Help Please : Not able to modify host file

The place for all kinds of software for all kinds of operating systems.

Moderator: Dposcorp

Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 12:39 am

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. Contact the administrator to obtain permission. "

This is my personal PC & I am the only one using this computer. No one else's names are added in the user accounts & it shows that I am the administrator in control panel's user accounts.

How do I resolve this ?

Thanks
dan99t
Gerbil First Class
 
Posts: 119
Joined: Thu Jan 19, 2012 8:19 am

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 12:54 am

When you get the properties on the file, what user is listed as the owner (Details tab) and what users/groups have modify/write permissions (Security tab)?
(Personally, I always run as an ordinary user and for things like this I just have a shortcut to the HOSTS file with notepad set to run as Administrator).
UberGerbil
Gerbil Khan
 
Posts: 9993
Joined: Thu Jun 19, 2003 3:11 pm

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 1:32 am

As UberGerbil said it's a permissions issue. You can probably just run Notepad as an administrator, then open the HOSTS file from that Notepad instance.
Duct Tape Dude
Gerbil First Class
Gold subscriber
 
 
Posts: 131
Joined: Thu May 02, 2013 12:37 pm

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 2:13 am

UberGerbil wrote:When you get the properties on the file, what user is listed as the owner (Details tab) and what users/groups have modify/write permissions (Security tab)?
(Personally, I always run as an ordinary user and for things like this I just have a shortcut to the HOSTS file with notepad set to run as Administrator).


First I have named my computer as " abc "

Administrator : just an initial "D"
-------------------------------------------------

This is what I found in property :

Details Tab
-----------------------
Attributes : A
Owner : SYSTEM
------------------------
Under
Groups or User Names :
SYSTEM
Administrators ( abc\Administrators )
Users (abc\Users)

I tried the second method of opening notepad as an administrator & opening host file from there but nothing was listed in folder " etc " So I did not find host file there.

Now I guess the first method to Edit ? & what should I put & where ?

Thanks
dan99t
Gerbil First Class
 
Posts: 119
Joined: Thu Jan 19, 2012 8:19 am

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 2:39 am

dan99t wrote:I tried the second method of opening notepad as an administrator & opening host file from there but nothing was listed in folder " etc " So I did not find host file there.

It's probably because the open dialog is set to filter out anything not a *.txt file. Click on the drop down above Open/Cancel and change it to "All Files (*.*)" or just type "*.*" (minus the quotes) into the File name box and hit enter; that would show all the files in the directory. You can actually also just type in "hosts" (as long as you're in .../drivers/etc/) and it would open the hosts file straight away.
2600K @ 4.8GHz; XSPC Rasa/RX240/RX120 Phobya Xtreme 200; Asus P8Z68-V Pro; 16GB Corsair Vengeance 1333 C9; 2x7970 OC w/ Razor 7970; Force GT 120GB; 3x F3 1TB; Corsair HX750; X-Fi Titanium; Corsair Obsidian 650D; Dell 2408WFP Rev. A01; 2x Dell U2412m
mortifiedPenguin
Gerbil Elite
 
Posts: 812
Joined: Mon Oct 08, 2007 7:46 pm

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 2:40 am

dan99t wrote:I tried the second method of opening notepad as an administrator & opening host file from there but nothing was listed in folder " etc " So I did not find host file there.

When you use File -> Open and get the Open File dialog, did you switch the file type to "All Files"? By default you will be shown only .txt files.
Image
The Model M is not for the faint of heart. You either like them or hate them.

Gerbils unite! Fold for UnitedGerbilNation, team 2630.
Flying Fox
Gerbil God
 
Posts: 24494
Joined: Mon May 24, 2004 2:19 am

Re: Help Please : Not able to modify host file

Postposted on Wed Feb 19, 2014 7:47 am

All Files did the trick.

Thank You all. Really appreciate the help.
dan99t
Gerbil First Class
 
Posts: 119
Joined: Thu Jan 19, 2012 8:19 am

Re: Help Please : Not able to modify host file

Postposted on Sat Feb 22, 2014 4:21 pm

So I just have a shortcut for this (right click on the desktop or wherever and create a new Shortcut and call it "Edit HOSTS" or whatever). In the properties for the shortcut, on the Shortcut tab, the Target is set as:
Code: Select all
%windir%\system32\notepad.exe %windir%\System32\drivers\etc\hosts
The "Start in" option is also set to
Code: Select all
%windir%\System32\drivers\etc
On the Advanced dialog (reached through the Advanced... button on that tab) "Run as Administrator" is checked. (You to have access to that checkbox you need to be creating/editing this shortcut as an Admin user).

This allows me to run as a normal user but still edit my HOSTS file whenever necessary (I get prompted for my admin password when I launch the shortcut, of course).

I don't use this as much as I used to because I now maintain the hosts file in my router to centralize it for my entire network.
UberGerbil
Gerbil Khan
 
Posts: 9993
Joined: Thu Jun 19, 2003 3:11 pm


Return to General Software

Who is online

Users browsing this forum: No registered users and 5 guests