locked
Cannot delete files - "Access is denied" RRS feed

  • Question

  • Hi all,

    I think this might have happened due to the problem described in KB946676 but I cannot delete two files on my WHS box. I've attempted things like using the "fsutil reparsepoint delete" command (which also gives me an "Access is denied" error) and also trying to repropogate permissions from parent folders (resulting in the same error).

    I'm not losing a huge amount of space as these files are relatively small but I've only just become aware of this issue after installing PP1 (and whilst PP1 introduces functionality to detect these problems I do not have reason to believe it caused problems with these two files as they were already buggered before the installation thus why I am posting here).

    Anyone have another solution?
    Friday, June 13, 2008 6:04 AM

Answers

  • Are you sure you issue the fsutil command correct (and in the correct folder)? Also filenames with special characters may be a problem.

     

    You can try Open command shell. cd to the folder containing the reparsepoints for the problematic files (like D:\shares\software), then run the following two lines of code, one after the other. They both do the same thing, one does it for all the files that contain no spaces, the second for everything else.

    For %i in (*.*) do fsutil reparsepoint delete %i

    For %i in (*.*) do fsutil reparsepoint delete "%i"

     

     

    Alternatively you can try using the cleanup utility of user catsaver: http://calvin-au.com/whscleanup/. It may take some time to run, however it will find also other problematic files (if they exist) and will result in a command file that you can execute to remove the reparsepoints.

     

    If this also fails please post in more detail what's happening.

    Friday, June 13, 2008 9:13 AM
    Moderator

All replies

  • Probably not recommended, but I used a hex editor to manually erase the sector and ran chkdsk to complete the removal.
    Friday, June 13, 2008 8:58 AM
  • Are you sure you issue the fsutil command correct (and in the correct folder)? Also filenames with special characters may be a problem.

     

    You can try Open command shell. cd to the folder containing the reparsepoints for the problematic files (like D:\shares\software), then run the following two lines of code, one after the other. They both do the same thing, one does it for all the files that contain no spaces, the second for everything else.

    For %i in (*.*) do fsutil reparsepoint delete %i

    For %i in (*.*) do fsutil reparsepoint delete "%i"

     

     

    Alternatively you can try using the cleanup utility of user catsaver: http://calvin-au.com/whscleanup/. It may take some time to run, however it will find also other problematic files (if they exist) and will result in a command file that you can execute to remove the reparsepoints.

     

    If this also fails please post in more detail what's happening.

    Friday, June 13, 2008 9:13 AM
    Moderator
  • Yes, I'm certain I executed the command correctly and in the proper location.

    The filenames were nothing special (ming-banner.gif and chatserver.java).

    I've already removed the files now but I'll run that utility you have recommended anyway just to see if it picks anything else up.

    Thanks!
    Friday, June 13, 2008 9:28 AM
  • FYI - my Home Network Health has now returned to green.

    I'm still running that tool though but may have to interupt it when I add in another drive tomorrow.
    Friday, June 13, 2008 10:07 AM
  • I have the same issue, I have about 25 files in 5 directories. Neither solution here helped, the tool could not do anything - since it could not access the files... Neither can I take ownership of the files to change the ACLs...

     

    Wednesday, July 9, 2008 6:56 PM
  •  mcinbash wrote:
    I have the same issue, I have about 25 files in 5 directories. Neither solution here helped, the tool could not do anything - since it could not access the files... Neither can I take ownership of the files to change the ACLs...

     

     

    If you have the same issue both methods should work.

     

    Can you please detail (for one folder) exactly what you did, step by step?

    Wednesday, July 9, 2008 8:13 PM
    Moderator
  • Sorry, I've been out of town.

     

    1) Remote Console to WHS, logging on as Administrator

    2) open CMD console

    3) change to local directory where files exist

    4) Execute commands per previous post [see section 1]

    5) execute WHS cleanup utility [see section 2]

     

    Other notes:

    Previously run chkdsk /f on this drive

    Previously attempted to take ownership of the files - "access denied"

    Files are marked READ ONLY (copy from CD), attempts to change attributes: "access denied"

     

    [section 1 start]

    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>For %i in (*.*) do fsutil reparsepoint delete %i

    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete 14.ITW
    Error:  Access is denied.


    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete 28.ITW
    Error:  Access is denied.


    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete 32.ITW
    Error:  Access is denied.


    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>
    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>For %i in (*.*) do fsutil reparsepoint delete "%i"

    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete "14.ITW"
    Error:  Access is denied.


    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete "28.ITW"
    Error:  Access is denied.


    D:\shares\Software\Installs\BMW TIS\TIS\GRAFIK\1\04\68>fsutil reparsepoint delete "32.ITW"
    Error:  Access is denied.

     

    [section 2 start]

     

    Activity,File,Status
    File test commenced7/15/2008 8:52:48 AM
    started thread
    D:\shares\software\installs\bmw tis\tis\grafik\1\04 starting
    "Testing", "D:\shares\software\installs\bmw tis\tis\grafik\1\04\68\14.ITW",D:\shares\software\installs\bmw tis\tis\grafik\1\04\68\14.ITW Access to the path 'D:\shares\software\installs\bmw tis\tis\grafik\1\04\68\14.ITW' is denied.
    [remaining entries removed]

    cleaning up
    application finished

    Tuesday, July 15, 2008 4:01 PM
  • I have since done quite a bit of research on this, and have found nothing to fix the issue. My notes above stating that the files are marked read only is not true.  Any and all access, by any utility I can find, results in an access error, this includes applications to set the ACLs. Data Recovery applications which read the raw blocks show all the data to be binary zeros, of the length specified by the file system attributes. SysInternals Filemon does not show an error being thrown. Regular Chkdsk ran through once, and hung once. I'm going to run chkdsk /r this evening from the boot point and see what happens. with 1.4m files, it takes a very, very long time.

     

    Wednesday, July 16, 2008 4:34 AM
  • This problem was resolved with a "chkdsk /v /f /r", run from the command line. Interestingly enough, it was not resolved by scheduling the chkdsk to run at startup, I assume because the /r was not passed through.

     

    Wednesday, July 16, 2008 3:46 PM
  • i have this problem often, it's usually caused when a process is accessing the target for deletion/renaming/moving resulting in it being locked from modification (often times explorer.exe causes this, other causes include for example if you've just watched a video and go to delete it afterwards you'll find that your media player is still processing it), this happens to reduce the risk of errors occuring from programs trying to access files and being unable to find then, and will often times only unlock the file upon system reboot. while forcing the deletion/etc of locked files CAN case temporary system instability, often times it wont (ie, files locked due to explorer.exe are perfectly safe to delete),the hard part is forcing a delete of a locked file, for this purpose i'd recommend "unlocker", it's a freeware windows shell extension that will, upon detection of the "access denied" or similar locking handles, display a list showing the process' that are causing the locking handle, if any, and prompt you on what to do with the file: no action, delete, rename, or move, after choosing anything other then no action, you then choose whether to end the process' locking the file/folder/etc, or to kill the process' (the later only being a safe option for non-system process' or system process' that can be restarted, ie. explorer.exe handles your desktop, folder display, start menu, etc, and can be restarted in the taskman by the command "explorer.exe" without the qoutes, but forces a refresh of the display upon restarting)
    • Proposed as answer by cobaltex Monday, September 12, 2011 4:35 PM
    Tuesday, September 6, 2011 5:56 AM