Solved

unable to edit hosts files on server 2008 r2

Posted on 2014-03-14
5
2,534 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 20

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 500 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

821 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