Share this article

This article is translated in

Improve this guide

Fix Access Denied Errors with Ease [CMD, Hard Drive, Folder]

Gain the right privileges in order to access the data you want

16 min. read

Updated onNovember 8, 2024

updated onNovember 8, 2024

Share this article

This article is translated in

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

For fixing Windows errors, we recommend Fortect:

Fortect will identify and deploy the correct fix for your Windows errors. Follow the 3 easy steps to get rid of Windows errors:

Access is deniedmessage can appear while trying to access certain directories or applications thus interfering with your work. If access to a network share, an Intranet, or the Internet is being refused to you and you are seeing the message above, then you do not have the authorization to access the resource in question and will need to use another account.

How do you fix Access Denied errors on Windows?

How do you fix Access Denied errors on Windows?

1. Take ownership of the directory

1.1 Automatically assign permissions

The problem is present on all versions, so you can getAccess denied message on Windows 11as well. Luckily, we have solutions that will help you regardless of the version you’re using.

This error usually appears when you try to access afileor a directory while having insufficient privileges. This happens if you’re not an administrator or if you don’t have ownership over a folder.

To fix the problem you just have to assign ownership to youraccount, and you can do that by following these instructions:

1.Locate the problematic folder, right-click it and choosePropertiesfrom the menu.

2.Navigate to theSecuritytab and then click theAdvancedbutton.

3.Locate theOwnersection at the top and click onChange. TheSelect User or Groupwindow will now appear.

4.In theEnter the object name to selectfield enterAdministratorsor your user name, then click theCheck Namesbutton. If everything is in order your input will change.

5.ClickOKto save changes. The owner section will now change.

6.CheckReplace owner on subcontainters and objectsand clickApplyandOKto save changes. Some users are suggesting to checkReplace all child object permission entriesoption, so you might do that as well.

1.2 Manually assign permissioms

In some cases, you might have to manually assign permissions to youraccount. To do that, follow these simple steps:

If yourusername is already available, simply double-click it and performStep 5.

1.3 Use Command Prompt to take ownership

Another way to take ownership is to useCommand Prompt. To do that, startCommand Promptas administrator and enter the following lines:

Of course, be sure to replace path_to_folder with an actual path to the inaccessible folder. After running these two commands you should have full access to the problematic folder, and thus fix the Access is denied error with Command Prompt.

2. Add youraccountto the Administrators group

SometimesAccess is deniedmessage appears if you try to access a folder while not having administrator privileges. This can be a problem, but you can fix it by adding youraccountto the Administrators group.

To do that on Windows 10, follow these steps:

3. Enable the hidden Administratoraccount

Windows 10 by default has a built-in Administratoraccountthat you can use. By using thisaccountyou should have unrestricted access to your PC.

Due to security measures, thisaccountisn’t easily accessible, but you can enable it by doing the following:

Keep in mind that after switching back to your mainaccountthe issue might still persist. If needed, you can use the Administratoraccountto make the necessary changes to your system and fix the problem.

4. Check your permissions

Sometimes you’ll getAccess is deniedmessage if you lack certain permissions to access the desired directory. However, you should be able to fix the problem by following these steps:

This is a simple solution, but if youruser nameisn’t on the list you’ll have to add it manually and then change its permissions.

Severalusersreported that you need to grantFull controlto bothAdministratorsandUsersover the problematic folder, so be sure to try that as well.

In some cases, you might even want to giveFull ControltoEveryonein order to fix the problem.

5. Use Command Prompt to reset permissions

According tousers, you might be able to fix this problem simply by usingReset Permissionstool. Simply download the tool, run it, select the problematic directory, and check all available options.

After doing that, you should be able to access the directory without any problems, otherwise,OneDrive may be causing this issue, so to fix it you need to do the following:

If that doesn’t solve the problem, you’ll need to perform the following steps as well:

If the problem still persists, you might have to repeat this solution and disable OneDrive until Microsoft fixes the problem.

6. Set youraccountas administrator

If you’re gettingAccess is deniedmessage, you might be able to fix it simply by setting youraccountas an administrator. This is rather simple and you can do it by following these steps:

7. Close Google Drive and reinstall it

Access is deniedmessage sometimes appears while usingGoogle Drive. To fix the issue, you need to completely close Google Drive and end all processes associated with it. To do that, follow these steps:

8. Edit your registry

According tousers, thiserror messagecan appear if you try to access a network-shared directory. This can be a big problem, but you can resolve it by making a few changes to your registry.

Modifying the registry can cause certain issues, so be extra cautious and export your registry just in case. To modify your registry, do the following:

Keep in mind that this solution only applies to network-shared folders, so it won’t work with local folders.

9. Turn off User Account Control

User Account Controlis a useful feature that will prevent applications and users from running commands that require administrative privileges.

This is a useful feature, but sometimes it can causeAccess is deniedmessage to appear, especially when installing new software. To fix the issue, you need to do the following:

10. Disable your antivirus software

Antivirussoftware is rather important, but sometimes third-party antivirus can cause this error to appear.

According tousers, they gotAccess is deniedmessage while trying to install certain applications, and the cause was their security software.

To fix this issue you just need to temporarily disable your security software and try to install the application again.

If the problem doesn’t appear, it means that the issue was caused by your antivirus software, so you should consider updating or replacing it.

There are multiple efficient antivirus programs that will not interfere with other applications on your PC. Then, discover them and choose from thebest antiviruses compatible with Windows10.

11. Change ownership or permissions of Temp and Installer folders

When installing new software its temporaryfilesare usually moved to Temp or Installer folders. However, if you don’t have the necessary permissions, you might not be able to install the desired application.

If thiserror messageappears while trying to install applications, be sure to check if the following folders have the necessary permissions

If needed, you might have to change ownership or permissions in order to fix this problem.

12. Check environment variables

In some cases, Access is denied message can appear while trying to create a zipped folder in Windows.

This is usually because the%TEMP%variable isn’t properly set. To fix this problem, you need to configure environment variables by doing the following:

After doing that, navigate to the %TEMP% folder by entering %TEMP% in the address bar in File Explorer. Once you open the Temp folder, try to create a new folder and delete it.

If you can’t create or delete a folder, you’ll need to take ownership of the Temp folder or change your permissions.

13. Fi Access is denied on Windows 10 cmd

  1. Pin Command Prompt to Start Menu

If you’re gettingAccess is deniedmessage while trying to start Command Prompt, you might want to try pinning it toStart Menu.

  1. Run Command Prompt as administrator

SometimesAccess is deniedcan appear in PowerShell or Command Prompt while trying to run a certain command.

This message indicates that you don’t have the necessary privileges to access a specificfileor to perform a specific command. However, you can fix this issue in most cases simply by running Command Prompt as an administrator.

We already explained how to start Command Prompt with administrative privileges in one of our previous solutions, so be sure to check them out.

14. Fix Access is denied on Windows 10 hard drive

  1. Change your permissions

If you can’t access ahard drivepartition due toAccess is deniedmessage, you might want to try changing your permissions or the owner.

We already explained how to do that in our previous solutions, so be sure to grant Full Control to youruser accountin order to access your hard drive partition.

Severalusersreported that you can fix the problem by giving Full Control to Everyone group, so try that as well. Keep in mind that you might have to add the group manually if it’s not available on the list.

It’s crucial to remember that you shouldn’t change the permissions of your system drive. If you have problems accessing yourC: drive, you might want to try a different solution.

We have to mention that this solution can be potentially dangerous, so keep in mind that you’re using it at your own risk.

  1. Change the sharing settings

According tousers, if this error appears while accessingexternal hard driveyou can fix it simply by changing a few settings. To fix the issue, due to the following:

  1. Check if USB drives are blocked

Sometimes you might not be able to access an external hard drive due toAccess is deniedmessage. This can occur becauseUSB drivesare blocked by your registry.

Before we start fixing the problem, we have to mention that this solution can be potentially dangerous, so be extra cautious. To search your registry, do the following:

Keep in mind that these values might not be available on your PC, so if you can’t find them you should probably skip this solution.

  1. Uninstall HP Device Manager

If you’re having this error while accessing a hard drive partition on an HP device, you might want to try removingHP Device Managersoftware.

Severalusersreported that this application prevents them from accessing their hard drive, so be sure to remove it and check if that solves the problem.

15. Fix Access is denied on Windows 10 Notepad

  1. Run Notepad as administrator

Thiserror messagecan appear sometimes while startingNotepad. If you have the same problem, you should try running Notepad as an administrator.

To do that, simply locate the Notepad shortcut, right-click it, and chooseRun as administrator. If that solves the problem, you should set Notepad to always run with administrative privileges.

To do that, follow these steps:

  1. Change howfilesopen

Access is deniedmessage can appear if Notepad starts automatically with Windows. This is usually caused by .inifiles, but you can easily solve this issue. To do that, follow these instructions:

After your PC restarts, check if the problem is resolved.

  1. Delete desktop.inifiles

If Notepad andAccess is deniedmessage appears every time you start your PC, you might want to try deleting thedesktop.inifile.

Thisfileis located in these directories:

Visit both directories and removedesktop.inifilesfrom them. Keep in mind that thisfilecan be hidden, so be sure to reveal hidden files and folders. We already showed you how to do that in our previous solution, so be sure to check it out.

After deletingdesktop.inifiles, the problem should be completely resolved and Notepad won’t start anymore along with Windows.

Why is Access denied when I am the administrator?

User Account Control is a helpful security feature that is included with Windows 10. The purpose of this feature is to alert you anytime you or an application tries to carry out an action that needs administrator capabilities.

Even if you are logged in with an administrative account, you can get a notice saying that access is forbidden when you try to use this function. You may get around that however by turning off the User Account Control option on your computer.

To find out more solutions, check out our guide on how tofix Access denied on Windows 10/11 administrator account.

You might also want to read our article onwhat to do if the default save location couldn’t be setfor more information.

Another variation of the access denied error is anerror occurred while attempting to create a directorywhen you attempt to install a program. This message usually means that you don’t have the proper privileges to access this directory. Sometimes, you might even getAccess denied message on administrator account.

In other instances, you’ll getYou need permission to perform this action error. In most cases, switching to a proper account or taking ownership of the folder in question will fix the problem.

Access is deniedmessage can affect both files and folders, and it can even prevent you from installing new applications. This can be a big problem, but we hope that you manage to solve it by using one of our solutions.

More about the topics:Windows Update

Milan Stanojevic

Windows Toubleshooting Expert

Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.

User forum

6 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Milan Stanojevic

Windows Toubleshooting Expert

Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.