SOLVED! Icacls Access Is Denied

Once it comes to changing permissions on Windows computers, a lot of ways exist but in terms of convenience, the icacls command is second to none. By taking advantage of icacls, Windows users can tweak the right to access, edit and delete of all accounts including administrator ones in mere seconds. However, it’s worth pointing out that the icacls command still experiences issues on occasions. Check out this article to learn what must be done when icacls access is denied on computers that use Windows OS.

Causes

Usually, when icacls access is denied, the file or folder’s ownership has been revoked for some reason. Until you do something about the ownership, you should have a hard time exercising certain rights over the affected items. 

Icacls Access Is Denied: Solutions

Command Prompt 

Versatile and flexible, Command Prompt allows Windows users to perform a wide range of tasks. If you notice that icacls access is denied on your PC, you should make use of CMD.

  • Step 1: Go to Search bar, type cmd, right-click Command Prompt and pick Run as administrator. 
  • Step 2: In Command Prompt (Admin), type takeown /F / fileX.txt then hit Enter.
  • Step 3: Type icalcls fileX.txt /t /c /GRANT Everyone:F and hit Enter.

Note: “fileX.txt” and “F” represent the name of your file/folder and the drive that hold it respectively 

Take Ownership 

As mentioned above, if icacls access is denied, things might have gone wrong with the ownership of a target file or folder. To bring things back to normal, you should add Take Ownership to the right-click drop-down menu and use it. 

  • Step 1: Press Start, type regedit and hit Enter to open Registry Editor.
  • Step 2: Give Registry Editor permission to apply changes to your PC.
  • Step 3: Look to the left, navigate to HKEY_CLASSES_ROOT and expand shell.

Note that you’re going to make changes in two Registry locations. One location adds Take Ownership to the drop-down menu for files. The other location adds Take Ownership to the drop-down menu for folders.

Files

  • Step 4A: Right-click the shell, select New and choose Key. Name the new key runas. In the case that the runas key is already present, skip to the next step.
  • Step 5A: Select the runas key then double-click (Default) to open Properties.
  • Step 6A: In Properties, type Take Ownership in the Value box and click OK.
  • Step 7A: Right-click the runas key, choose New and select String Value. Name the new value NoWorkingDirectory.
  • Step 8A: Right-click the runas key, choose New and select Key. Name the new key command.
  • Step 9A: Select the command key then double-click (Default) to open Properties.
  • Step 10A: In Properties, type cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F in the Value box and click OK.
  • Step 11A: Right-click the command key, choose New and select String Value. Name the new value IsolatedCommand.
  • Step 12A: Double-click IsolatedCommand to open its Properties window.
  • Step 13A: In Properties, type cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F in the Value box and click OK.

Folders

  • Step 4B: Right-click the shell, select New and choose Key. Name the new key runas. In the case that the runas key is already present, skip to the next step.
  • Step 5B: Select the runas key then double-click (Default) to open Properties.
  • Step 6B: In Properties, type Take Ownership in the Value box and click OK.
  • Step 7B: Right-click the runas key, choose New and select String Value. Name the new value NoWorkingDirectory.
  • Step 8B: Right-click the runas key, choose New and select Key. Name the new key command.
  • Step 9B: Select the command key then double-click (Default) to open Properties.
  • Step 10B: In Properties, type cmd.exe /c takeown /f \”%1\” /r /d y && icacls \”%1\” /grant administrators:F /t in the Value box and click OK.
  • Step 11B: Right-click the command key, choose New and select String Value. Name the new value IsolatedCommand.
  • Step 12B: Double-click IsolatedCommand to open its Properties window.
  • Step 13B: In Properties, type cmd.exe /c takeown /f \”%1\” /r /d y && icacls \”%1\” /grant administrators:F /t in the Value box and click OK.

Assuming that you don’t mess up, you would be able to see Take Ownership every time you right-click files/folders. Free free to use Take Ownership to regain rights over items on your computers.

Frequently Asked Questions

How come my PC keeps showing me Access Denied error during the installation of applications?

If the Access Denied error appears times and again as you install apps, there is a good chance that your security program is responsible. All you have to do to dismiss the error is to disable the security program for the time being. 

What is UAC?

Windows operating system relies on User Account Control (UAC) to regulate accounts and prevent unauthorized changes to the computer.

What is the importance of permissions in Windows?

In layman’s terms, permissions determine which users can access what files and folders. If Windows users set the permissions well, it’s possible to reduce data loss due to human errors. 

Should I use an administrator account?

The administrator account is the “top” account in Windows with the ability to change security settings, install apps, configure functions, tweak other user accounts, … However, unless you have something that requires administrator privileges, there is no need for an administrator account.

Can I stop Windows 10 from asking for permissions?

Yes, you can. Open Control Panel, navigate to System and Security, select Security & Maintenance and expand Security. Scroll downwards and choose Change settings under Windows SmartScreen. Note that Administrator rights are required to apply changes to Windows SmartScreen. Next, tick the box beside Don’t do anything (turn on Windows SmartScreen) then hit OK. 

Tips And Tricks

  • There are three types of user accounts in Windows 10. The Standard user account is for ordinary activity while the Administrator account delivers maximum control over the system. Lastly, the Guest account is for users that only need temporary access to the computer system.
  • Do not use the Administrator account in your Windows 10 computer for day-to-day operations. Instead, stick to a standard user account. The Administrator account should be used for software installation, hardware configuration and security implementation. The less time you spend on an Administrator account, the higher the security level of your system.
  • The Registry Editor (regedit) can be used to delete a built-in Administrator account in your new computer.
  • Windows 10 superusers can use icacls in Command Prompt to modify NTFS file system permissions and grant Administrator control over files or folders.
  • Get to know Windows 10 Access Control List (ACL) before exercising user account administration in a network environment. The ACL contains security information that defines the rights of each user account regarding access or control over files, folders, applications, devices, groups and processes.

 

Leave a Comment