0

When executing the following command:

takeown /F D:\ /A /R /D Y

I get the following error:

The parameter is incorrect.r): "D:\$Recycle.Bin\S-1-5-21-1597830813-2420638671-2875775154-1001\.

This occurs whether the command is executed through an elevated command prompt, or psexec started through an elevated command prompt. The command used to execute psexec in the elevated command prompt is:

psexec -i -s cmd.exe

Commands used are from the first answer and its comments on this question:

How would I use Takeown to take ownership of all folders on one drive?

chkdsk D: /r results:

   5722519 MB total disk space.
   4377584 MB in 9233276 files.
   4193228 KB in 1272116 indexes.
         0 KB in bad sectors.
  11410631 KB in use by the system.
     65536 KB occupied by the log file.
1361610408 KB available on disk.

      4096 bytes in each allocation unit.
1464965119 total allocation units on disk.
 340402602 allocation units available on disk.
Narf the Mouse
  • 223
  • 1
  • 3
  • 12
  • 1
    Why are you attempting to take ownership of files contained within the Recycle Bin? **That isn’t going to work.**. This error is due to the directory being inaccessible, which typically means, the file system is massively corrupt. – Ramhound May 21 '20 at 21:10
  • As per the command, I told it to take ownership of the D:\ drive. Since the D:\ drive used to hold Windows 10 a few years back, it has a recycle bin. I would delete said recycle bin, except, due to the error, I don't have permissions and can't access the drive. Also, I was using that HDD a few days ago, before I re-installed Windows, so I doubt the drive has been corrupted in the meantime. – Narf the Mouse May 21 '20 at 21:14
  • 1
    You can’t access the drive at all. By default only specific folders should be inaccessible by default, for instance, you should already have permissions to %LocalAppData% for a given user. If your unable to access directories that you should be able to access the you have suffered catastrophic hardware failure – Ramhound May 21 '20 at 21:18
  • The command "icacls D:\ /setowner "Administrators" /T /C" has no problem accessing the folders or files. – Narf the Mouse May 21 '20 at 21:31
  • 1
    still, checking the state of the filesystem and disk health is a good idea. what do the SMART stats show? is your disk healthy enough to withstand chkdsk? – Frank Thomas May 21 '20 at 21:57
  • Disk health is "Good", and none of the "current" or "worse" values are anywhere near the listed thresholds, or below 100. – Narf the Mouse May 21 '20 at 22:01
  • 1
    Very Good. Then I would check the filesystem itself, using `chkdsk /r`. – Frank Thomas May 21 '20 at 22:04
  • I have posted the chkdsk results. The disk is still not accessible. Thank you both for your help, and can I ask for more assistance? – Narf the Mouse May 23 '20 at 03:20
  • Running a full chkdsk with dismount, an ICACLS take ownership without following symbolic links, a Takeown with an automatic "No" on prompt, and an ICACLS to grant full permissions to myself (also not following symbolic links), appears to have fixed it, and I can access files on the device. – Narf the Mouse May 27 '20 at 08:16

0 Answers0