I am having this really weird problem with Windows 8 where it won't let me edit or save to my program files folder in my C: drive. It keeps telling me access is denied, even when I have taken ownership of the folder and am logged in as an administrator. I can save to my other drives just fine.

The new menu item is even missing the regular items and only allows me to create a folder.

enter image description here

Can someone please help me out? This is really frustrating.

Here is what the file looks like after I edited the permissions:

enter image description here

I gave myself full control yet I can't edit or create files in the directory.

migrated from stackoverflow.com Jan 12 '13 at 0:46

This question came from our site for professional and enthusiast programmers.

  • I have taken ownership of [my Program Files folder] Oh boy... – ta.speot.is Jan 12 '13 at 0:51
  • That picture is too small to make out anything. If my added instructions below aren't sufficient, consider posting shots of individual windows rather than the whole screen at once to keep them readable. – Nicole Hamilton Jan 12 '13 at 16:11
  • Paste this in your address bar: i.stack.imgur.com/woKZf.jpg – TheGateKeeper Jan 12 '13 at 18:31
  • @NicoleHamilton: Large images inserted via the imgur uploader can always be viewed at their original size by accessing their URL directly. In Firefox at least it's easy - simply right-click and select "View Image". – Karan Jan 13 '13 at 22:25
  • @Karan Thanks! I did not know that. – Nicole Hamilton Jan 13 '13 at 23:19

Being the owner does not automatically grant you the right to modify a file or directory. There's an ACL (access control list) that's preventing you from doing what you want. You can display or edit the ACL using the cacls command. For example, here's the ACL on my own Program Files directory:

12 C% cacls '\Program Files'
C:\Program Files NT SERVICE\TrustedInstaller:F
                 NT SERVICE\TrustedInstaller:(CI)(IO)F
                 NT AUTHORITY\SYSTEM:C
                 NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
                 BUILTIN\Users:(OI)(CI)(IO)(special access:)

                 CREATOR OWNER:(OI)(CI)(IO)F

Unless you have a really good reason you haven't mentioned, you probably don't want to change the ACL on this directory. But if you really, really do, here's how you'd give yourself full control:

cacls '\Program Files' /E /G userid:F


That cacls command modifies the ACL on just that directory, not the contents. If you'd like to edit a config file somewhere in your Program Files directory tree, you'll need to use the cacls command on that file itself. For example:

cacls '\Program Files\FooBarGame\ConfigDirectory\ConfigFile' /E /G userid:F
  • I simply want to edit a configuration file for a game. Why are there all these restrictions? I never had problems like this on Windows 7 and earlier. – TheGateKeeper Jan 12 '13 at 1:16
  • 1
    Uhm, you sure should have had problems under Win7. The ACL above is on a Win7 machine and I guarantee, it does prevent me from editing anything in that directory unless I'm elevated. One big reason not to edit stuff in your Program Files is because it'll screw up any uninstall of an application you've modified. – Nicole Hamilton Jan 12 '13 at 1:19
  • Is there any way to modify these cacls from the windows interface? The commands you pasted don't seem to work on Windows 8. I took ownership of the file and gave myself full permissions to them, but still I can't edit them. – TheGateKeeper Jan 12 '13 at 12:04
  • What do you see if you cacls the config file you're trying to modify? Your original question was how to modify the Program Files directory so I answered how to do that. But that only affects that directory, not everything it contains, so when you said it was a particular config file, perhaps I should have updated my answer as I just did. I don't have a Win8 machine to tell you how to use its GUI i/f. – Nicole Hamilton Jan 12 '13 at 16:09

All you have to do is make sure you open up notepad as administrator Start Menu > Right Click "notepad" app> choose "Run as administrator" on the task bar. Then edit and save you config file. I do it all the time with FSX.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.