Solved

unable to edit hosts files on server 2008 r2

Posted on 2014-03-14
5
2,303 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
Comment Utility
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
Comment Utility
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 19

Expert Comment

by:Patricksr1972
Comment Utility
Hi

Did you disable UAC on that box?
0
 

Author Comment

by:MehtaJasmin
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
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…
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…
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). …

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now