?
Solved

unable to edit hosts files on server 2008 r2

Posted on 2014-03-14
5
Medium Priority
?
2,988 Views
Last Modified: 2014-04-23
I am trying to edit hosts files on some servers and getting an access denied. I am logging in with the local administrator account and running notepad as an administrator but it will not allow me to save the updated hosts file in the etc folder. I also cannot save the file elsewhere and copy it to the etc folder; I still get access denied. I have tried to take ownership of the file and also get access denied message. I have other servers that allow editing of the hosts file with my normal domain admin account and no elevated privileges on notepad. Is there a registry setting or GPO entry that could cause this type of behavior? The servers are all general application servers with no special settings or permissions applied. Some of them are SQL servers but some of them are not and still have the same issue.
0
Comment
Question by:MehtaJasmin
5 Comments
 
LVL 13

Expert Comment

by:Santosh Gupta
ID: 39929282
hi,

run CMD as elevated command "Run As Administrator".
type notepad
it will open the notepad, now open the host file , edit and save it.
0
 
LVL 1

Expert Comment

by:kchall
ID: 39929292
if you copy the file to your desktop then edit the file then save it back to your desktop then copy it back to the original location
0
 
LVL 23

Expert Comment

by:Patrick Bogers
ID: 39929309
Hi

Did you disable UAC on that box?
0
 

Author Comment

by:MehtaJasmin
ID: 39930123
Santosh and kchall, thank you for your replies but as I stated, I'm running notepad as administrator and it doesn't allow me to save the file elsewhere and copy it to the etc folder.

Patrick, no I did not disable UACs because I was able to edit the hosts file on another server with the UACs enabled. I will try disabling them to see if it makes a difference. Thanks for the reply.
0
 
LVL 13

Accepted Solution

by:
Santosh Gupta earned 1000 total points
ID: 39930135
check the permission of ETC folder and HOST file. if administrators is not added then pls add.

if you are still unable to modify the host file  then take the ownership of EC folder. Do not remove any permission.  and then try.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question