0

I have a file that I cannot delete due to inadequate permissions. I've already tried to change the file permission properties via the Windows GUI however, it said that I didn't have read permissions either. Next I tried using DD, in an admin command prompt, to read the file (and remove it), here's what I used and the error:

C:\Users\user>dd if=file\path.jar
dd: failed to open 'file\path.jar': Permission denied

I think if I can used something like dd to overwrite the file with null or random bytes then I can get rid of it (or at least corrupt that address so it doesn't appear on my file system). However, I need some overruling permission to do it because Windows won't let me access it no matter what user (admin or not) I use.

Notes:

  • I have one User on this system.
  • Two OS's are install, the old one doesn't have anything on it anymore (both versions of Windows 10)
  • 1
    To delete that file, If you utilize a modified version of this method and change the target to the file in question, it should work. – Run5k Jul 17 '18 at 05:31
  • @Biswapriyo, I know, I'm using DD for Windows. It's the first result on Google. – Preston Hager Jul 17 '18 at 06:16
  • @Biswapriyo, ok. I will in the future. However I don't think this matters or not based on what I'm trying to achieve. Thanks anyways, but first I'm going to try Run5k's method. – Preston Hager Jul 17 '18 at 06:20

1 Answers1

0

Where is the file location? Did you login with a account which has administrator priority?

AFAIK, there are some system important files which is not recommend to delete.

To delete a file, you need to have write permission of it. Please firstly take ownership of this file(make it owned by the user you logged in). Don't enable inheritance of the object. Then add the user to the ACL list as below, make sure they have full control. If all these done, click apply.

enter image description here

If you still can't delete the file, go back to properties-security tab, checking if the ACL settings have been modified. If it has been modified, it is possible that some 3-party software will change it, then you can audit the folder. The audit logs will be generated in event viewer-windows logs-security.