robklubs
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:
Tried several times to delete, but the system is telling me that I don't have read access to it, which appears accurate.
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
Tried several times to delete, but the system is telling me that I don't have read access to it, which appears accurate.
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
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):
However, I am getting this message that the folder is in use when I try to rename it (to shorten):
ASKER
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.
How long is the path? Can you rename the file or one of the folders? probably not.
ASKER
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.
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.
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.
ASKER
No illegal characters. Here is the full path:
E:\ServerFolders\Company\S haredData\ DR-SHIPPIN G-Warehous e\latest\D RIVEC\WIND OWS\assemb ly\NativeI mages_v2.0 .50727_32\ System.Dat a.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.
E:\ServerFolders\Company\S
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.
ASKER
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:
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?
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?
ASKER
Restore did not work, did not have access to overwrite the folder.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will try a reboot - and see where that leads. Most likely won't be until later on this evening.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The solution provided worked, but restarting the service would have also worked.
also make sure it is not an open file, see picture below:
Look for your file and close it.