Link to home
Start Free TrialLog in
Avatar of robklubs
robklubsFlag for United States of America

asked on

Can't delete a folder, or take ownership, or read access

Just finished a server migration and am cleaning up some unneeded files. One of them is a folder that used to hold backups for one of the client machines. The folder's contents mostly deleted except for one folder:

User generated image
Tried several times to delete, but the system is telling me that I don't have read access to it, which appears accurate.

User generated image
User generated image
I've tried several Setacl commands as well as takeown (the name of the folder is "System.Data.Entity.#":

SetAcl.exe -on System.Data.Entity.# -ot file -actn setowner -ownr n:administrators -rec cont_obj
Processing ACL of: <System.Data.Entity.#>
Reading the SD from <System.Data.Entity.#> failed with: Access is denied.


takeown /f  System.Data.Entity.# /r /d y
ERROR: Access is denied.


Is there something else I should be trying? This folder is nothing and just needs to go!

Thanks,

Rob
Avatar of pjam
pjam
Flag of United States of America image

File path looks pretty long, can you move the folder to a shorter name?  Max is 260 characters.
also make sure it is not an open file, see picture below:
User generated imageLook for your file and close it.
Avatar of robklubs

ASKER

Thanks for the quick response. I'm running Windows 2012 and don't see that screen that you shared. But it did check computer management | System Tools | Shared Folders | Open files and did confirm that that folder is not opened.

However, I am getting this message that the folder is in use when I try to rename it (to shorten):

User generated image
Path is ~137 characters long. Was able to deleted all except for this folder.
That obviously was from Server Manager in Windows 2008.  I have 2012 servers but they are not for file sharing, so not sure where Open file management is located.
How long is the path?  Can you rename the file or one of the folders?  probably not.
I think we posted at the same time, or close to it.

You are correct; cannot rename any of the folders. Path is about 137 characters long.
137 should be good.
Does it have an illegal character?  Surprisingly, windows allows that some times and then just try to do anything with it.  I see this especially from MAC people.
No illegal characters. Here is the full path:

E:\ServerFolders\Company\SharedData\DR-SHIPPING-Warehouse\latest\DRIVEC\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Data.Entity.#

There folder is zero bytes according to Windows. If that's true there's probably nothing in it. However, I just checked the location from which is was copied and there are a couple of files in there but it would only get the path up to 203 or so.

I'm confused on  how one message tells me that the folder is in use and the others say I need read access.
Just a thought, but I thought I might try to use Shadow copy to restore that folder. It's there, but the contents look completely different:

User generated image
I don't really understand what is happening. Windows shows a folder there (see a pics a few posts up) but shadow copy shows something quite different.

Should I try to restore it?
Restore did not work, did not have access to overwrite the folder.
ASKER CERTIFIED SOLUTION
Avatar of pjam
pjam
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will try a reboot - and see where that leads. Most likely won't be until later on this evening.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The solution provided worked, but restarting the service would have also worked.