0

I have files that was saved as offline files from a Synology server to the CSC folder on my computer that I would like to delete. I cannot delete the files unless I individually take ownership of every file and folder within the CSC folder. I have tried taking ownership of all containers within the folder as the admin, which has been unsuccessful. It says I have full control over the folder, but when I attempt to take control of all objects within the container, I receive a notification saying "An error occurred while applying security information... Failed to enumerate objects in the container. Access is denied." I have attempted to go through the command line and through the registry editor to clear that folder, but still no success. Is there anything else that I haven't tried to delete these files?

  • What commands have you tried from an elevated command prompt? – Greg Askew Mar 17 '23 at 17:14
  • I have used: C:\>takeown /f /r /d y in attempt to take ownership of everything in the folder. I have access to the folder itself, but not to the other subfolders and files in the CSC folder to delete them. – smithalysia92 Mar 21 '23 at 17:18
  • You may want to try using SysInternals psexec and run it as system. `psexec.exe -s -i cmd.exe`. Run the commands as system. – Greg Askew Mar 21 '23 at 21:07

1 Answers1

1

Let Windows do that for you:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CSC\Parameters]
"FormatDatabase"=dword:00000001

A reboot will reset your CSC and clean up all the files there. Taken from ugg.li where is also a script to do that manually (using psexec and takeown).

bjoster
  • 4,805
  • 5
  • 25
  • 33
  • Good info. Also here: https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/re-initialize-offline-files-cache-database – Greg Askew Mar 22 '23 at 10:53