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...

    Event ID: 7001 - Source: VSS - Unable to create a shadow copy

    When using Microsoft Windows Server, you may encounter the error message: "Unable to create a shadow copy."  In the Event Viewer, you may find the following Event: "Event ID: 7001 - Source: VSS - Unable to create a shadow copy."  This event involves the Volume Shadow Copy Service (VSS).  Most likely the Server was rebooted while creating a Shadow Copy.  Many websites describe deleting or renaming the C:\WINDOWS\SYSTEM32\WBEM directory used by Windows Management Instrumentation to resolve this issue.  This is not correct.  Following are the steps to resolve this issue: Double-click My Computer. Right-mouse click the Hard Drive causing the problem. Click the Shadow Copies tab. Select the appropriate Volume. Click Disable. Click OK. Click Start - Control Panel - Administrative Tools - Scheduled Tasks. Delete all tasks related to the Volume Shadow Copy Service. Reboot the Server. Double-click My Computer. Right-mouse click the Hard Drive causing the problem. Cl...

    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