Forum Home
Press F1
 
Thread ID: 101258 2009-07-07 01:33:00 Access denied to edit file on Windows 7 samnorr (13776) Press F1
Post ID Timestamp Content User
789713 2009-07-07 01:33:00 Put simply, I am trying to follow this (www.mediacollege.com) guide to modify an XML file in Windows 7.

I can open the file fine, but I keep getting an "access denied" message when I attempt to save it. I am logged on as an administrator.

Is there some setting that protects OS files in Windows 7?
samnorr (13776)
789714 2009-07-07 03:36:00 You'll need to take ownership of it first.

In start menu type cmd and right click>run as admin

Then type these commands hitting enter after each:

takeown /f PATH OF FILE /d y
icacls PATH OF FILE /grant administrators:F

Blam
Blam (54)
789715 2009-07-07 07:39:00 I just thought to try editing the file in XP (which I have on another partition), and it let me save it with no problems - so problem solved.

I did already try what you said above blam6, but it didn't work - I got the same "access is denied" message (in Notepad, Wordpad and Visual C#) . So I still don't actually know what was wrong. :confused:
samnorr (13776)
789716 2009-07-07 08:35:00 I just thought to try editing the file in XP (which I have on another partition), and it let me save it with no problems - so problem solved.

I did already try what you said above blam6, but it didn't work - I got the same "access is denied" message (in Notepad, Wordpad and Visual C#) . So I still don't actually know what was wrong. :confused: Could be the fact that you are not actually the "Real Administrator".

Your account may have admin rights but its not the "real Admin Account" , and the "take ownership" doesn't always work either.

To access the real admin account Have a read of this (www.mydigitallife.info) you dont need the password section.( skip step #4) then to hide it again, do the same, but change the "yes" to No.

Changing to the "Real" admin account may allow you to alter the file.
wainuitech (129)
1