Repairing unplugged USB drive

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Harry88
Posts: 2
Joined: 15 Nov 2016, 07:27

Repairing unplugged USB drive

#1 Post 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?

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Repairing unplugged USB drive

#2 Post 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.

Harry88
Posts: 2
Joined: 15 Nov 2016, 07:27

Re: Repairing unplugged USB drive

#3 Post 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?

Locked