22 Fixes For “Access Denied” Error In Windows

Are you getting the access denied error while accessing a specific file or folder? There can be many reasons for it. We are covering the solutions for the following issues:

  • Did you receive an ‘Access Denied’ error message? Or something similar?
  • Check if you can’t access or make changes to the file. This goes for deleting the file and folder, as well.
  • You can’t seem to access the file after updating. This could also be after you install a new operating system version. For example, updating from Windows 8 to 10 and so on.

This article is your ultimate stop to fixing the Windows Access Denied Error. Whether for Windows 7, Windows 8, or Windows 10, you will find the solutions. More importantly, we have attempted to compile any other problem, as well.

Over 22 solutions are waiting for you to fix the Access Denied Error. So without further ado, let’s begin! 

Solutions For ‘Access Denied’ Error In Windows 10, 8 Or 7

  1. Login As Administrator
  2. Change The Ownership
  3. Change Folder Permissions
  4. Check For Encryption
  5. Add The Account To Admin Group
  6. Enable The Admin Account To Access File Or Folder
  7. OneDrive Access Denied Issue Fix 
  8. Google Drive Access Denied Issue Fix
  9. Change Your Account To Administrator Account
  10. Edit The Registry
  11. User Account Control To Install An Application
  12. Change The Permissions Of Temp And Installer Folders 
  13. Access Denied For Zipped Folders 
  14. Access Denied Error For Command Prompt
  15. Access Denied Errors In Hard Drive
  16. External Hard Drive Access Denied Error
  17. Windows Access Denied For Notepad And Other Applications
  18. Fix Automatic Startup Apps
  19. Check The Antivirus Settings 
  20. USB Drives Blocked Access Denied 
  21. Delete The Desktop.Ini File 
  22. Uninstall The Third-Party Device Manager (HP)

Fix Access Denied Error For Files And Folders 

The access denied error for a file or folder appears due to the lack of permission. You might not have apt permissions or ownership of the folders and files. You can try the steps given below. But remember, if none of these work, the file might be encrypted. 

An encrypted file can only be accessed by the person who has the encryption certificate. No one else can access it. So, in that case, you can’t do much: 

1. Login As Administrator

Access denied - Login as admin

If you’re getting access denied messages to open or edit a file, you need Admin permission. You can fix this by logging into an Admin account or opening the file as an Administrator. You will need to get the permissions if you’re not the Admin. Often, logging in with Admin credentials will do the job.

Often, if the PC is shared among many users, it will need Admin permission if one user wants to access other files. This also goes for system files, program files and other similar essential files.

2. Change The Ownership

Change The Ownership

This fix works for the folder access denied error. If you take ownership through File Explorer, you can access it:

  • Right-click on the File or Folder you want the ownership of.
  • Then go to the properties and go to the Security Tab.
  • Click on the Advanced button in the tab.
  • A new window will open up. See the owner at the top.
  • It might show you the ‘Unable to display current owner’ message.
  • There should be a blue link button ‘Change.’ Click on it.
  • This would prompt you for Admin permission and log-in details if you didn’t log in as Admin.
  • Now, click on ‘Select User or Group.’ Now, you will have to type the Account name for the new owner. Ensure the account’s name is on your PC if it is a shared PC.
  • There might be an option to assign it to Admins or Users.
  • Once you type the username, click on Check Names. This will scan the system for existing usernames. Click OK.
  • Now, return to the Advanced option in the Security Tab. You will find the ‘Replace all child object permission entries’ option. Check this box and press OK.

Do you not know the username for your account because you use Microsoft Account (online)? It is the first five characters of your username.

A security advisory is not to assign ownership of essential files and folders to users. This goes for program files, system files, and other critical files. Try to keep their permission limited to Admin. Otherwise, you can risk potential security leaks.

You might have to manually assign the permission if the above-given steps didn’t work:

advanced properties settings computer click menu solution
  • Go to the Advanced Security Settings. You will find this in the System Properties. Often, it is known as ‘View Advanced Security’ or something similar.
  • Check the list of users. Now, check if your account is on the list. If it isn’t on the list, click on the Add button.
  • Now, click on ‘Select A Principal.’
  • Enter the account name, check names and then click OK.
  • Now you will have to follow through with the above-given steps.

You can also use the command prompt. For this, you will have to run the command prompt as Administrator. Then type these:

  • takeown / f “Folder directory here” / r / d  y
  • icacls “folder directory here” / grant Administrators: F / T

You must replace the ‘folder directory here’ with the actual directory. If you can’t find the directory, drag and drop the folder in the command line. It often automatically creates the directory for your command.

3. Change Folder Permissions

Change Folder Permissions

Sometimes, the above-given step won’t work. For Admins, it is an easy task. But, what if you want to permit someone else to avoid access denied error? Reviewing the permissions of the folder or file would be ideal.

  • Once again, right-click the file or folder.
  • Go to the properties and Security tab.
  • Once again, you will see the list of users and groups.
  • When you click each user or group, you will see their permissions.
  • Click on the Edit button to change the permissions. You can only do this as the Admin.
  • Now you can select permissions like Full Control or Read and so on.

Full Control gives the user complete control over the folder and files. The read will only allow others to see what is in the folder.

4. Check For Encryption

Check For Encryption

If nothing has worked so far, check for the encryption. As mentioned above, you won’t access encrypted files without a password. But, you can still check if it is encrypted or not:

  • Go to the Properties of the File or Folder you’re trying to access.
  • Then go to the General Tab and click on the ‘Advanced’ button.
  • See if ‘Encrypt contents to secure data’ is checked. If it is, you will have to find the person who did it.

5. Add The Account To Admin Group

Add The Account To Admin Group

Often, the access denied error appears because your account doesn’t have Admin permissions. You can give your account Administrator privileges easily. All you need to do is follow these steps:

  • Press Windows + X key or Right-click on the Start Menu. Select ‘Computer Management’ from the options.
  • Go to the Local Users And Groups in the computer management window.
  • Then go to users and double-click your account. It should be on the left panel.
  • Find the ‘Members of’ tab and click on the Add button.
  • There will be a ‘Enter the object names to select field’ section.
  • Type Administrators in that area. Click on Check Namesadministrator. Let the process go through and click OK.
  • Now, select Administrators and click Apply. Then OK to save changes.
  • Restart your PC

6. Enable The Admin Account To Access File Or Folder 

Even if you have a single account on Windows 10, you might not have Admin permissions. It happens because Windows 10 has a default built-in Admin account. This exists in your pre-existing account. But, to access it, you will have to follow these steps:

  • Once again, press Windows Key + X. Select Command Prompt (Admin) from the options.
  • Type: net user Administrator / active: yes. Then press enter.
  • This should unlock the Admin account for you. Now, you will have to log out of your current account.
  • Then select the Admin account from the login menu.
  • Now you can access files and folders you wish to access.

But remember, once you’re done, you might want to disable the Admin account. Otherwise, any other person could access it. Go back to your primary account and launch the command prompt (Admin) again.

This time type: net user administrator / active: no. And press enter.

7. OneDrive Access Denied Issue

OneDrive Access Denied Issue

Maybe the problem isn’t in your account’s file or folder. It could be the OneDrive preventing access. You can try these steps:

  • Find One Drive in the Taskbar at the bottom right corner of your Windows.
  • Right-click on it and select Settings from the options.
  • Find the AutoSave or backup tab and check the Documents and Pictures. Select the ‘This PC only’ option for the two.
  • Click OK.

See if you can access the OneDrive files and folders now. If you still can’t, you can use the command prompt. All you need to do is launch the command prompt as Admin again, by following the above-given guide. Then, type the following and press enter after each:

  • cd /users/Your_Username_Here
  • icacls Pictures /reset /t /q
  • cd /<type directory to OneDrive folder here>
  • icacls Pictures /reset /t /q

Remember, you can drag and drop the directory, as well. But once you follow through with the command, restart the PC. See if the problem for OneDrive is solved. If still not, you can access Microsoft Support.

8. Google Drive Access Denied Error

You can also get Google Drive access denied error like One Drive. You can try the following steps:

  • Press CTRL + Shift + Esc. This will open Task Manager.
  • Find the Google Drive processes in the Task Manager.
  • Right-click on each and select End Task. Repeat it for all Google Drive tasks.
  • Now, uninstall Google Drive from your system.
  • Launch Run utility again (Windows + R key).
  • Type %localappdata%Google and hit enter.
  • Find the Drive folder in that directory. Rename it to Drive.old

Now install Google Drive again and see if it solves the issue.

9. Change Your Account To Administrator

If you can’t seem to make the above-given changes or can’t access the Admin account, you can try this step. If you still get Access Denied Error, give this a go:

  • Press Windows + R key to launch Run. Then type control userpasswords2 and hit enter.
  • This will open Users Accounts. Check on ‘Users must enter a user name and password to use this computer.’
  • Select your account and go to the properties.
  • Find the Group Membership tab and select Administrator in the options. Click Apply and Press OK. See if this solves the issue.
  • You will have to restart the PC once.

10. Edit The Registry

Often, you can fix a lot of errors by editing the Registry. But it would help if you were careful. While the registry seems full of texts, it is integral for your PC’s functions.

So, when doing anything with the registry, make sure to make a system or registry backup. This way, if you mess up, you can recover. You can make a system restore point before you try this step:

  • Press Windows + R key, and type Regedit, then hit enter.
  • Go to the directory key: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters
  • Now, on the right side of the panel, click on the space. Select New > DWORD (32-bit) value.
  • Now, enter ‘AllowInsecureGuestAutth’ as the name of the new DWORD.
  • Once created, double click on the name and go to properties. Find the Value Data and set it to 1. Then click OK.
  • Restart your PC and see if this solves the problem for the access denied errors.

Remember, this setting only works for network shared folders. It won’t work for the local files and folders.

11. User Account Control To Install An application

User Account Control features

Generally, the reason behind Access denied could be User Account Control. The User Account Control features give the Admin privileges or take them away. Usually, it pops up when you’re trying to access folders that need Admin permission.

Similarly, it appears when you try installing a new app or software that can change your system. At the same time, you can get the same access denied error. So try these steps:

  • Use the Search Bar below to type User Accounts and select it from the list.  For other Windows Users (7 and 8) you can press Windows + S key.
  • Go to Change User Account Control Settings option. Now, there will be a slider. Move it down.
  • Click OK and save changes.
  • Now try to install the apps again.

12. Change The Permissions Of Temp And Installer Folders

If you’re still having trouble installing a new app, it could be due to temp or installer folders. This happens when you don’t have permission to access them.

You can use the above-given steps to change the permission. Check these directories:

  • C: WindowsInstaller
  • C: Users/Your_User_Name/AppDataLocalTemp

Change their permissions by going to properties as you would do for any folder or file.

13. Access Denied For Zipped Folder

Did you face the denied access error when creating a zipped folder? It could be due to the %TEMP% variable not being set correctly. You will have to configure and fix the environment variable for this. Follow these steps:

  • Go to the Search Dialog box and find Advanced System Settings (View Advanced System Settings).
  • Click on the Environment Variables option.
  • Find TEMP in the list and check the value. Double click on the temp and do the following: %USERPROFILE%AppDataLocalTemp
  • Save the changes by clicking Apply and OK.
  • Then restart the PC

Now, reaccess the temp folder. You can do it by typing %TEMP5 in Run or File Explorer. See if you can create a folder in the TEMP. If you can, then good. Otherwise, you must go to the TEMP folder’s properties and change the permissions. For this, use the above-given steps of modifying a folder’s permission,

14. Access Denied Error For Command Prompt

There are many reasons to get Access Denied when trying to access Command Prompt. You can start by pinning Command Prompt to Start Menu. For some strange reason, this solution often works. It changes the directory.

  • All you need to do is search for the command prompt.
  • Right-click on it and select the ‘Pin To Start Menu’ option.
  • Now, try and see if you can launch Command Prompt.

Did you get an error while working with Command Prompt? Some commands and permissions need Admin permission. 

Thus, you can end up getting access denied error. This could be annoying if you were deep in the command chain. To prevent this problem from occurring, launch command prompt as Administrator.

  • Search for Command Prompt in the Search Bar.
  • You can also use the one Pinned to Start Menu.
  • Right-click on it and select ‘Run As Administrator.’
  • You can also right-click Start Menu and select Command Prompt (Admin).

15. Access Denied Errors In Hard Drive

Are you having trouble accessing the hard drive’s component? This Access Denied Error could surface, especially for the secondary hard drives. The first step would be to change the permissions and the ownership of the Hard Drive.

You can follow the same Properties and Security Settings steps, going to Advanced. It follows the same pattern as a file or folder. But, if nothing works, the best way is to give Full Control to the Everyone Group in permissions.

Also, try not to change the permission of your system’s drive or drive partition. Changing the drive permission in which system files are installed can lead to problems. So, try never to do that as you will end up causing more problems and errors.

16. External Hard Drive Access Denied Error

Apart from the hard drive, or secondary hard drive, you might have an external one. You can face an access denied problem for this, but you can fix it conveniently:

  • Go to This PC and find the External Hard Drive.
  • Right-click on it and go to properties.
  • Now, see the Sharing Tab and go to Advanced Sharing.
  • In the Advanced Sharing option, locate the ‘Share this folder’ option.
  • Click on permissions and once again, select Everyone and select Full Control. Allow it and press Apply, then OK.
  • Reconnect the External Hard Drive and see if it solves the problem.

17. Windows Access Denied – Notepad And Other Apps

Run compatibility troubleshooter

Are you having a problem or access denied error message with Notepad or other apps? It could be related to permissions, as well. You can try and run the app as an Admin. There are two ways to do it.

  • First, you can right-click on the app icon and select the Run As Administrator option. Then, you will get a pop-up window and allow access. Sometimes, you might have to put in Admin credentials to access it. But this is a temporary solution, and you will have to repeat it repeatedly.
  • The second option is to enable Run as Administrator permanently. For this, go to the Properties of the app. In the compatibility tab, find ‘Run this program as an Administrator.’ Check it on.
  • You can also go to Properties and General Tab. Go to Advanced and check on ‘Run As Administrator.’ Then click on Apply and OK to save changes.

This option works for almost any app or platform that you want to run. Try this option if you’ve been having access-denied issues with any app.

18. Fix Automatic Start Up Apps

Some apps that automatically load with a startup may also cause the error. If you’re getting an Access Denied error for any such app, you can change the .ini file for the app:

  • Go to the C Drive and go to the View option in the top tab. Select Hidden Files and File Name Extensions. This will enable you to see .ini files.
  • Now, locate the ini file for your app in the C Drive directory. It could be for a Notepad, or any other app.
  • Right-click on the file and select Open With. Then select ‘Choose Another App.’
  • Select ‘Provisioning Package Runtime Processing Tool’ and click OK.
  • Restart the PC and see if this solves the issue.

Usually, this option works for almost any app or software. Remember, this is not for files and folders.

19. Check The Antivirus Settings

security tab windows folder security ownership tab microsoft data create free note explorer correct ticket previous logged

If you’ve tried every other known solution but still run into the problem, it could be the antivirus. Yes, the antivirus can prevent you from accessing specific files. It happens because the software considers the folder or file as a threat.

To fix this, you will have to access the individual settings of your antivirus. Then, you will have to allow the file or folder to allow access. You can also try temporarily disabling the antivirus. Usually, that works wonders. But the problem might appear again once you activate the antivirus.

20. USB Drives Blocked Access Denied

Are you trying to access a file or folder on a USB device? This could be for a USB Flash Drive or Hard Drive. Either way, you might face the access denied error message. This can lead to the prevention of files and folders access. There can be many reasons for it, but usually, the registry editor can fix this:

  • Open the Registry Editor and find the Computer in the Left Panel.
  • Then Press CTRL + F and find RemovableStorageDevices in the option. Click Next.
  • Once you find it, check its values. See if DENY is set to 1. Either way, set it to 0.
  • Make sure to save changes.

If this value isn’t available in your registry, don’t make any changes. Don’t try to mess with the registry editor too much.

21. Delete The Desktop.ini Files

This solution is only if you consistently face the access denied error message. Do you start up each time and receive the Access is Denied error? Then the problem is with the desktop.ini file. You can locate it and delete it. All you need to do is:

  • Go to the directory.
  • C:/Users/Your_User_Name/AppData/Roaming/MicrosoftWindows/StartMenu/Startup
  • C:/ProgramData/MicrosoftWindows/StartMenu/Programs/Startup
  • Find the desktop.ini file in both of these directories.

Make sure to view hidden files from the view option. After all, it could be hidden. Now, go ahead and delete these files. Remember that it is a critical step and should only be done as a last resort.

22. Uninstall The Third-Party Device Manager

The most common third-party device manager is the HP Device Manager. But, you might have tried other kinds of device managers as well.

These device managers can make accessing the hard drive partition or different devices difficult. As such, it is better to uninstall them. You can uninstall the HP device manager by following the simple steps.

  • Go to the Control Panel and the Programs Window. Then Uninstall the program and select HP Device manager.
  • You can also try the apps section if you can’t find it there.

Remember that you won’t be able to uninstall the built-in device manager. This is mainly the HP Device manager, as several users have reported problems with it.