Skip to main content

How do you delete files or folders that produce the error message Access Denied?

The following script will reset file permissions to factory defaults.  All members of the Administrators Group and System Account will be granted full rights to all files and folders on the SystemDrive and the ownership of all files and folders will be set to the Administrators Group.  Using a User Account with Administrative privileges, you will then be able to delete any file on the hard disc as you would normally.  System File Protection is still in place and functions properly.  (Please Note: If you only have a small number of files and/or files to delete, you may wish to use the Unlocker utility.)

Windows XP
  1. Download and then install the Subinacl.exe file.

  2. Start Notepad.

  3. Copy and then paste the following text into Notepad.

    cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
    subinacl /subdirectories %SystemDrive%\*.* /setowner=administrators
    subinacl /subdirectories %SystemDrive%\*.* /grant=administrators=f /grant=system=f

  4. Save this Notepad file as ResetFilePermissions.cmd.

  5. Double-click the ResetFilePermissions.cmd file to run the script.

  6. Note This script file may take a long time to run. You must run this script as an administrator.

  7. Reboot.
Windows Vista or Windows 7

If you are using Windows Vista or Windows 7, you would simply execute the following two commands:
  1. Click Start - Run.

  2. Type: cmd

  3. Hit Enter.

  4. Type: takeown /f %SystemDrive%\*.* /r /d y

  5. Hit Enter.

  6. Type: icacls %SystemDrive%\*.* /grant administrators:F /t

  7. Hit Enter.

  8. Upon completion, reboot.
    http://www.smartnetadmin.com

    JDER2QQ35NP5

    Comments

    Popular posts from this blog

    Access Denied (policy_denied). Your system policy has denied access to the requested URL. For assistance, contact your network support team.

    While browsing the internet, you may encounter the message: "Access Denied (policy_denied).  Your system policy has denied access to the requested URL.  For assistance, contact your network support team."   This message indicates the internet traffic is being filtered.  The most common source of an internet traffic filter is in corporate environments that use a proxy server or a firewall appliance designed to filter web traffic.  Some businesses are configured as satellite locations using a VPN tunnel.  In these configurations, the VPN may be configured to filter internet traffic.  In rare instances, the Internet Service Provider is filtering internet traffic.  Typically though, your IT Department or a Network Management Team has configured your internet traffic to be filtered.  Isolating Source of Web Filtering In an environment that is unmanaged and the source of the filtering is unknown, following are some steps you may wish to peform: Th...

    How do you stop an unstoppable Windows Service?

    You may encounter a Windows Service in Services that has the buttons for Start, Stop, Pause and Resume greyed out.  If you attempt to stop the Service using sc stop [servicename], you encounter the error message: "The requested control is not valid for this service."  To resolve this issue, please perform the following steps: Click Start - Control Panel - Administrative Tools - Services. Double-click the relevant Service. Change the Service Start-Up Type to Disabled. Click Apply. Click OK. Hit CTRL-ALT-DEL on your keyboard. Select Task Manger. Perform an End Task on the relevant Service. This issue has been resolved. http://www.smartnetadmin.com

    The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer.

    You may encounter the following error message when using the L2TP/IPSec VPN Client that is native to the Windows Operating System: "The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer."  This error message typically occurs when you are using the wrong Pre-Shared Key for your L2TP VPN.  This error message can occur when other components of your configuration are incorrect but the first thing to confirm is that you are using the correct Pre-Shared Key. If you are using the wrong Pre-Shared Key, the L2TP VPN connection will say Connecting for a long period of time and then display the error message: "The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer." If you are using the wrong username or password, the L2TP VPN will immediately respond with: "The remote connection was denied b...