Error 5 Access Denied on Windows

Error 5: Access denied is a known issue on Windows 10. This error prevents you from installing software on your computer and accessing or modifying certain files.

What Causes the ‘Error 5: Access Denied’ Issue?

The reason for this issue is the unavailability of permissions. Windows 10 will prevent you from installing if you don’t have Administrator privileges or if your account is not the Administrator account.

Getting administrator privileges for your account on the computer solves this problem. But before moving on, temporarily disable your Anti-virus program and see if this makes any difference. If it does, it probably means that the Antivirus was the culprit. If not, you can continue with the solutions below and enable the Antivirus later on.

How Can I Fix Error 5: Access Denied?

Method 1: Fixing Security Permissions of the Temp folder

  1. Press Windows Key once and click File Explorer.
  2. Type  in the address bar located in the middle top of File Explorer and press Enter.
  3. Locate the Temp Folder and right-click on it then select Properties.
    Open Properties of Temp Folder
  4. Click the Security tab and then click Advanced.
    Click Advanced in Security Tab
  5. Check if Replace all child object permissions with inheritable permissions from this object is ticked. If it isn’t, then check it and click continue.
    Check the Option of “Replace all child object permissions with inheritable permissions from this object”
  6. Now select any entry that isn’t inherited from C:\Users\[Username]\ folder and click Remove.
  7. Click Apply then click OK.

Method 2: Get Administrator privileges

Make sure you have the Administrator privileges before trying to run the setup. To do that, right-click on the setup that you are getting the issue on and select Run as Administrator.

Method 3: Make your profile Administrator

  1. Hold Windows Key and press R.
  2. Type netplwiz and press Enter.

    Run netplwiz Command
  3. Select the user that you want to make the administrator of the PC.
  4. Click Properties.

    Change Properties of the User
  5. Click Group Membership tab.
  6. Click the Administrator and click Apply. Then click OK.
Select the Administrator

Method 4: Moving the installer

If you are getting the error on a specific installer then copy or move it to Drive C or whatever drive Windows is installed on and then try to run it. It should fix the issue.

Method 5: Enable Built-in Administrator account

Basically, when you install Windows 10 then Windows create 2 extra accounts for you on its own. One of them is a guest account and the other one is an administrator account. Both of these are inactive by default.

You can check the account by performing the following steps

  1. Hold Windows Key and press X (release Windows Key). Click Command Prompt (Admin).
    Open Command Prompt (Admin)
  2. Type net user and press Enter.
Run “net user” in Command Prompt

The main difference between your administrator account and the built-in administrator account is that the built-in administrator account has full unrestricted access to your computer. So, enabling the built-in administrator account can be helpful when you are having privileges problem on Windows 10.

These are the steps for enabling the built-in administrator account.

  1. Hold Windows Key and press X (release Windows Key). Click Command Prompt (Admin).
    Open Command Prompt (Admin)
  2. Type net user administrator /active:yes and press Enter. You should see a message Command run successfully.
    Run net user administrator /active:yes in Command Prompt

It’s always good to password protect your administrator accounts to prevent people from making changes in the PC.

  1. Type net user administrator <Password> and press Enter (you should write the password which you want to set for the administrator account in place of <Password>).

OR

  1. Type net user administrator * and press Enter. You will be asked twice to enter the password that you want to set for the administrator account. Just type your password and press Enter.
Run net user administrator * in Command Prompt

Now try to run the program and there shouldn’t be a problem. If you want to disable the administrator account then follow the below step.

  1. Hold Windows Key and press X (release Windows Key). Click Command Prompt (Admin).
  2. Type net user administrator /active:no and press Enter.
Run net user administrator /active:no in Command Prompt

Method 6: Adjust UAC Settings

This step is not recommended as it will make your system vulnerable to many threats. There are some applications that are not compatible or conflict with the UAC (User Account Control) settings. Disabling the UAC (to minimize the UAC’s interference in application installation and folder access) may solve the problem. UAC is the main security firewall which prompts for a password or authentication when you are installing or running software.

  1. Press the Windows key, type UserAccountControlSettings and in the results, click on UserAccountControlSettings.
    Open UserAccountControlSettings
  2. Now in the User Account Control Settings window, adjust the slider to Never Notify and then click OK.
    Adjust the slider to Never Notify
  3. Now install the application or perform the action you were trying to complete.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

42
    SS
    Sunny Senpai Nov 3, 2019

    I don’t know why but it doesn’t matter what I do, the setup fails to install registry keys.
    Even on the default administrator account that you enable using cmd.

      SW
      Shane Warren Author Nov 5, 2019

      Any specific error that you are facing? or any further detail of your situation? I’d be happy to further help you in this regard.

        SS
        Sunny Senpai Nov 6, 2019

        Thank you but I fixed it, what happened was there was already an existing corrupted key and for some reason it doesn’t even have the ownership for any group and couldn’t delete/modify at all. So I gave ownership to myself for that key and deleted it, which finally solved the problem.

        Reply
    HR
    Harmen Rijks Sep 6, 2020

    Tried all of the above and more, and I’m getting nowhere. I have an external drive that is recognised by Win10, shows up on the desktop, but when I click it I get ‘Access denied’. I also get messages saying that it failed to enumerate objects in the container, whatever that tech speak means…..
    https://uploads.disquscdn.c

      KA
      K. Arrows Author Sep 6, 2020

      What is the drive letter for this drive when connected?

        HR
        Harmen Rijks Sep 6, 2020

        The drive letter is F

          MZ
          Muhammad Zubyan Author Sep 6, 2020

          Hey it seems like that your external drive (F) is trying to access something from your drive (C) and your drive isn’t letting the external drive to access those files resulting in a loop of errors it can be because of bad permissions however I will try my best to assist you with that so, first of all, we need to check if your administrator can even access the drive from Command prompt for checking that please run you Command prompt as an administrator and then type “F:” without quotes in your CMD after that type “dir” without quotes and let me know what appears after that. Looking forward to your reply keep me updated so I can assist you further.

          HR
          Harmen Rijks Sep 7, 2020

          Hi, It still says ‘Access Denied’
          https://uploads.disquscdn.c

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Ok seems like their is a big issue with your permissions so please try these commands one by one and let me know what happens keep me updated please so i can assist you.icacls “F:” /grant YOURUSER:(OI)(CI)F
          icacls “F:” /reset /T /Creplace YOURUSER with your PCs username.

          HR
          Harmen Rijks Sep 7, 2020

          It doesn’t accept F:

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Was this hard drive attached to another computer before? I want to know that because I think there is another way around this problem. And tell me if this drive is bootable.

          HR
          Harmen Rijks Sep 7, 2020

          The drive came straight from Seagate as a replacement for another new drive that showed identical issues. It says it is a recertified drive, so I guess has been attached to another PC. It can be seen in Disk Management, I formatted it via cmd diskpart. It came as an ex-FAT drive and I formatted it as NTFS. In both formats it denied access. My backup drive is not affected and works fine.
          https://uploads.disquscdn.c

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          It’s really unfortunate to see that you are stuck in this problem however there are still some steps that we can try to help you fix this issue but we can’t be sure as we do not know the root cause of the problem yet, So please open the command prompt as an administrator and try this commandTAKEOWN /F f: /R

          HR
          Harmen Rijks Sep 7, 2020

          Getting somewhere, but not that far…
          https://uploads.disquscdn.c

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Ok, Can you please try this one?takeown /F f: /A /R /D Y

          HR
          Harmen Rijks Sep 7, 2020

          Drive now owned by the administrators group, but access still denied.
          https://uploads.disquscdn.c

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          OK there is one more thing that we can try so first of all open CMD as an administrator and put this command net user administrator /active:yesNow switch users to Administrator (You can do that by pressing the start menu button and clicking on the icon with your avatar once you press it there will be another user named as “Administrator” Press it and you will be logged into a new account with all the permissions”

          HR
          Harmen Rijks Sep 7, 2020

          Doesn’t work….

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          OK so there is an alternative way to get into safe mode first of all open run by pressing the win+r key or by right-clicking on the start menu and clicking on run once run is opened type “msconfig” without quotes into the empty field and press enter now go into the boot section tick the option “safe boot” and select “minimal” now press apply and restart your computer you will be booted into safe mode once you are done with the steps just open msconfig again and untick safe boot. Hopefully, this will help you keep me updated.

          KA
          K. Arrows Author Sep 7, 2020

          Can you boot into safe mode and then try accessing this drive? Also from safe mode, command prompt, try the following:takeown /f “F:” /r /a /d yFollowed by a:ICACLS “F:” /reset /T /C /L /Qpost screen shot of the result.

          HR
          Harmen Rijks Sep 7, 2020

          Is there anything straight forward in Windows? Can’t boot into safe mode with F8, F4, Shift/Restart without triggering a bitlocker demand for a password which I can’t enter as the keyboard doesn’t work. Aargh. How can people use their time efficiently with this OS? (Sorry, getting rather frustrated)

          KA
          K. Arrows Author Sep 7, 2020

          Can you turn off bitlocker temporarily to do this

          HR
          Harmen Rijks Sep 7, 2020

          Done that. Makes no difference. All I’m getting is “Device is not ready. Successfully processed 0 files. Failed processing 1 files.

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Ok, I think this will help you first of all you need to download Process Explorer. Here is the link: https://download.sysinterna…Download it, Extract it and then open the executable file inside the folder after that hover your mouse over the “Find” section and click on the option “Find Handle or DLL” after that you will see a window poped up type “F:” and press Search after that you will find some processes listed down send me a screenshot of those processes so I can assist you further.

          KA
          K. Arrows Author Sep 7, 2020

          Would you be okay for me to do a remote session?
          Please email me on kevinarrows@appuals.com.

          HR
          Harmen Rijks Sep 7, 2020

          Hi Kevin, that’s fine, but I have to take a planned call at 15.30 first. Can we do this at 16.00?

          KA
          K. Arrows Author Sep 7, 2020

          Perfect. Please email us teamviewer ID and password at 16:00.

          HR
          Harmen Rijks Sep 7, 2020

          Sent you my ID via email. I’m available now.

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Cool, We will be in touch with you shortly.

          HR
          Harmen Rijks Sep 7, 2020

          Hi that worked. Changing the drive letter seems to have done the job. Rebooted and I still have access. Fab. Even Seagate didn’t manage that!

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          Finally, Glad to know that it’s fixed.

          HR
          Harmen Rijks Sep 7, 2020

          Not quite. My back-up drive that used to work and had a different drive letter, now is dedicated as the F drive and is now inaccessible. The Seagate drive on E is now accessible. They seem to have swapped places. Weird.

          HR
          Harmen Rijks Sep 7, 2020

          Finally managed to start in safe mode. Ran takeown /f “F:” /r /a /d y It came back with: “F: System Volume Information FileprotectorSTDBstatus.db” now owned by the administrators group. I then ran ICACLS “F:” /reset /T /C /L /Q to which it responded: operation not allowed as it would create an un-usable ACI. Successfully processed 17 files, failed processing 1 files. Nightmare getting out of Safe mode as mouse doesn’t work in safe mode.I restarted and then downloaded Process Explorer. Both “F:” and F don’t result in anything. See screendump
          https://uploads.disquscdn.c

          MZ
          Muhammad Zubyan Author Sep 7, 2020

          That’s a step towards success. Will assist you further over a remote session.

          KA
          K. Arrows Author Sep 7, 2020

          Would you be okay for me to do a remote session?
          Please email me on kevinarrows@appuals.com

    HR
    Harmen Rijks Sep 6, 2020

    Will it work for an external drive though?

    HR
    Harmen Rijks Sep 6, 2020

    Won’t work on a drive.

    HR
    Harmen Rijks Sep 7, 2020

    You mean open safe mode and the use:

    takeown /f “F:” /r /a /d y

    Followed by a:

    ICACLS “F:” /reset /T /C /L /Q

      KA
      K. Arrows Author Sep 7, 2020

      Please ignore the last message and correspond via email with me.

        HR
        Harmen Rijks Sep 7, 2020

        Hi,There definitively is something fishy with drive letter “F”.
        I changed the drive letter to H and gained access again.
        I can now see both the E drive (Seagate) and the H drive (WD/Acronis)Any idea what is going on with naming a drive “F”?RegardsHarmen Rijks
        harmen.rijks@gmail.comDisqus wrote on 07/09/2020 16:33:

        Reply
          MZ
          Muhammad Zubyan Author Sep 7, 2020

          It seems to me that the drive letter “F” is encrypted or locked as you mentioned it was used on another PC before so there are issues getting the permissions for it.

    MI
    Miraak May 3, 2023

    Great work folks ! You saved me again! I got Error 5 ACCESS DENIED. Per your advice I moved LOOT from my Drive D (where my game is) into my Drive C. Now my game works like perfect. Thanks much!!