Page 1 of 1

Repairing unplugged USB drive

Posted: 15 Nov 2016, 07:47
by Harry88
I have a 2 TB Seagate USB drive that I accidentally unplugged without ejecting, and my computer (Windows 7) said "You need to format the disk before you can use it", and Disk Management said the disk type was RAW.

I found TestDisk v7 and used it successfully to analyse the drive (the Quick Search function correctly identified the partition and listed the files) and to copy the contents onto another disk.

I then used the Write command to write the partition table to the drive; however, Windows Explorer on my computer now says "Location is not available. E:\ is no accessible. Access is denied."

I tried chkdsk /f, which said that it found and fixed errors, and it now says there are no errors, and the drive and its contents are listed OK by the Command Prompt, but Windows Explorer still says "Location is not available", etc.

Can TestDisk do something additional to make the drive fully accessible in Windows, or do I need to reformat the drive?

Re: Repairing unplugged USB drive

Posted: 15 Nov 2016, 20:27
by cgrenier
If you have a copy of all your files, it's a good idea to format this partition and copy the files back.

Re: Repairing unplugged USB drive

Posted: 16 Nov 2016, 01:51
by Harry88
Thanks for your reply.

Disk Management lists the drive OK (Volume = "Seagate Expansion Drive (E:)", Layout = Simple, Type = Basic, File System = NTFS, Status = "Healthy, Active, Primary Partition"), with the correct size, and a disk check reported no errors on the drive, and I could access everything on the drive OK in Windows Explorer with Windows in safe mode, or in Command Prompt as an administrator with Windows in normal mode; the only issue was that I could not access the drive as an ordinary user with Windows in normal mode, so this appeared to be only a security settings issue. (This probably arose when I ran chkdsk, which said that it reset something on all the drive contents.)

I tried the following commands in Command Prompt as an administrator.

takeown /f e:\* /a /r /d y
(My understanding is that this gives ownership of everything to the administrators group, and it ran successfully.)

icacls e:\* /grant users:F /t /q
(My understanding is that gives full access to the users group, and it ran successfully.)

Now I can access everything OK as before.

However, is there a way to reset the user permissions to a clean default setting, to avoid any further issues?